Is it possible to put a variable in the rename function? I'm having trouble with it.
If I specify the filename, the function works fine for me.
rename($the_path . "/" . $the_file_name, $the_path . "/" ."newfile");
But, if I try and use a variable to rename, it gives me an error.
rename($the_path . "/" . $the_file_name, $the_path . "/" .$variable);
The Error it gives me is:
Warning: Rename failed (Permission denied)
If anybody can offer me even a slight suggestion, it would be greatly appreciated!
Thank you