Page 1 of 1

Copying folders and their files?

Posted: Tue Jul 15, 2003 1:23 am
by Mr. Tech
Hi!

I am writing a script and need some help with moving a folder and it's files, into another folder. I looked at: http://au.php.net/manual/en/ref.filesystem.php and found this:

Code: Select all

<?php
copy('testdir', 'test') ;
?>
It's suposed to move testdir into test but I get this error:

Warning: Unable to open 'testdir' for reading: Permission denied in c:\program files\easyphp\www\dir\index.php on line 34

Woulkd this have something to do with chmod? Or is it the wrong way to do it?

Thanks

Posted: Tue Jul 15, 2003 3:08 am
by Tubbietoeter
check this link: http://de.php.net/manual/de/function.copy.php


did you check on the permissions? and try to give the whole paths to the folders to the function.

Posted: Tue Jul 15, 2003 3:29 am
by Mr. Tech
Tried both... does anyone have something like this that works?