how to use rename() function?
Posted: Wed Aug 25, 2010 1:17 am
I have a lot of experience working with PHP, but I'm unable to make rename() working for me.
I'm getting this error.
Let me know what I'm doing wrong in it?
I'm getting this error.
And this is the code,Warning: rename(c:/zerocall_cdr/Cdr_1282293451.csv,c:/zerocall_cdr/error/Cdr_1282293451.csv) [function.rename]: No such file or directory in .... .php on line 162
Code: Select all
$root_dir = 'c:/zerocall_cdr';
$backup_dir = $root_dir.'/backup';
$file = "Cdr_1282293451.csv";
rename("$root_dir/$file", "$backup_dir/$file");