Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/06/2011, 08:40
Avatar de Etherman
Etherman
 
Fecha de Ingreso: abril-2011
Mensajes: 93
Antigüedad: 13 años
Puntos: 2
Escribir .php con php

Hola amigos, como podría escribir un archivo.php, con una función php?

Lo he intentado así....

Código PHP:
<?php
$archivo
"config.php"// el nombre del .php
$nombre$_POST['nombre'];


$fchfopen($archivo"w"); // Abro el archivo config.php
fwrite($fch"<?php
$path_thumbs = \"../fotos/"
.$nombre."/".$nombre."\";
$path_big = \"temp\";

//the new width of the resized image.
$img_thumb_width = 300; // in pixcel

$extlimit = \"yes\"; //Do you want to limit the extensions of files uploaded (yes/no)
//allowed Extensions
$limitedext = array(\".gif\",\".jpg\",\".png\",\".jpeg\",\".bmp\");


//check if folders are Writable or not
//please CHOMD them 777
if (!is_writeable($path_thumbs)){
   die (\"Error: The directory <b>($path_thumbs)</b> is NOT writable\");
}
if (!is_writeable($path_big)){
    die (\"Error: The directory <b>($path_big)</b> is NOT writable\");
}
?>\r\n"
);
fclose($fch); // Cierro el php.
 

?>


Como podía añadirle "<?php", "?>", y "$" ??
o quizas de otra manera....

Última edición por Etherman; 14/06/2011 a las 08:56