A
Anonymous
Guest
Hello.
Just a quick query.
I've got some php code which will upload a image file to the server. - Which is working.
All I would like to check is, how do I delete the old image file on the server and if I decide to rename a filename, how might I go about it?
I'm currently looking at the following:-
chmod($old_filename,0755);
unlink($old_filename); //Delete the old file
rename($newfile_name, $old_filename); //Rename the new file to the old filename.
Have I got the right code?
Thank You.
Just a quick query.
I've got some php code which will upload a image file to the server. - Which is working.
All I would like to check is, how do I delete the old image file on the server and if I decide to rename a filename, how might I go about it?
I'm currently looking at the following:-
chmod($old_filename,0755);
unlink($old_filename); //Delete the old file
rename($newfile_name, $old_filename); //Rename the new file to the old filename.
Have I got the right code?
Thank You.