Joined May 2014
·

Mehrose khan

Pakistan
·

Posted to Rename folder in PHP over 1 year ago

Hy
i am using this rename function with some editing like
saving folders name in variables
following is my code:

rename(realpath(dirname(FILE)).$oldfoldername,realpath(dirname(FILE)).$newfoldername);

$oldfoldername= $row['facility_name'];

old folder name is coming from D.B.

$newfoldername=$startback.$date.$endback.$oldfoldername

new folder name is a combination of date time and some alphabets.

i am getting following error :

Warning: rename(C:\xampp\htdocs\restaurantd,C:\xampp\htdocs\restaurantback%05/20/2014 08:21:34 %d) [function.rename]: The system cannot find the file specified. (code: 2) in C:\xampp\htdocs\restaurant\DeleteUser.php on line 31.

i need help.
thanx in advance :)

Achievements
1 Karma
0 Total ProTip Views