PHP rename function problem

Zack HootsC22F

New Member
I'm trying to move a file on my server from one folder to another using the php rename function, but I'm getting this error\[quote\] Warning: rename(/home/pramiro/public_html/new/cipri/adauga/tmp/Koala.jpg, /home/pramiro/public_html/new/images/memo/Koala.jpg) [function.rename]: No such file or directory in /home/pramiro/public_html/new/cipri/adauga/categorie.php on line 13\[/quote\]The paths are good, the folders exist and the file to be copied is in the tmp folder.What could I be doing wrong?This is the code:\[code\]$filename=$_POST['poza_conv'];$filename=substr($filename,37);$old_path='/home/pramiro/public_html/new/cipri/adauga/tmp/'.$filename;$new_path=' /home/pramiro/public_html/new/images/';switch($_POST['categorie_conv']){ case 'memo': $filename=$new_path.'memo/'.$filename; break; case 'ort_sup': $filename=$new_path.'ort_sup/'.$filename; break;}rename($old_path,$filename);\[/code\]
 
Back
Top