Forum Moderators: coopster
I have another file that copy a template from a folder (here for the example: footer.php)
to another folder
within that folder where now is the new copied "footer.php"
I run the following script
Which results in "No such file et..."
The idea behind $ID is that the new file got to be have a different name than other similar files
And got to be unique so I grab the ID from the DB and pass it to be part of the renamed file
Well it does not work as planned!
Thanks for looking at the script
Henry
<?
$rename=$id;
$file_name = footer.php;
$read_extension = explode(".", $file_name);
$ext = $read_extension[1];
$renamed = $rename.".".$ext;
rename($file_name, $renamed);
?>