Possible Duplicate:
copy a file from one dir to another dir
I would like to copy from local content from a php file and copy it to another file before copying php and make a specific content replace a php file.
I do the following:
chmod ('../archivo.php',0777);
$archivo= fopen("../archivo.php" , "r");
$get=file_get_contents($archivo);
$nuevoarchivo = fopen('../new-archivo.php', "w+");
fwrite($nuevoarchivo,$get);
fclose($nuevoarchivo);
But do not copy anything How could I?
Thank you very much and hug.
Don’t mix
file_get_contentsandfopen.Also Can you be more specific about what you want to replace?