Problems with reanme()...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mr. Tech
Forum Contributor
Posts: 205
Joined: Tue Feb 11, 2003 4:18 pm
Location: Australia

Problems with reanme()...

Post by Mr. Tech »

Hi!

I need to be able to renames folders so I use the rename cmd. But when I got to rename a folder I get this error:

Warning: rename() failed (No such file or directory) in c:\program files\easyphp\www\created\rename.php on line 2

But it still renames the folder!!!

Why am I gettting this error? :?
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

Not sure about the problem, but a quick fix would be..

Code: Select all

if (!@rename($folder)){
echo "Folder did not rename.";
}
.. which allows error checking, but supresses those obtrusive html errors.
Mr. Tech
Forum Contributor
Posts: 205
Joined: Tue Feb 11, 2003 4:18 pm
Location: Australia

Post by Mr. Tech »

i'll try thank!

Does anyone know the error?
Mr. Tech
Forum Contributor
Posts: 205
Joined: Tue Feb 11, 2003 4:18 pm
Location: Australia

Post by Mr. Tech »

Awesome! It worked! Thanks!
Post Reply