[solved][56K WARN] Php directory copy (empty) in php
Moderator: General Moderators
[solved][56K WARN] Php directory copy (empty) in php
Hi
Can anybody please tell me how to copy a directory from one folder to another folder.?
Thank you.
Can anybody please tell me how to copy a directory from one folder to another folder.?
Thank you.
Last edited by dharprog on Sun Aug 05, 2007 12:05 am, edited 1 time in total.
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
TO MOVE:
untested, works for file, unsure of folder
http://au.php.net/manual/en/function.rename.php
EDIT: Acording to the comments on the above page, it should work.
TO COPY:
http://au2.php.net/copy
untested, works for file, unsure of folder
http://au.php.net/manual/en/function.rename.php
EDIT: Acording to the comments on the above page, it should work.
Code: Select all
rename("folder1/folder2", "folder4/folder2"); //WILL NOT LEAVE ORIGINALhttp://au2.php.net/copy
Code: Select all
copy("folder1/folder2", "folder4/folder2") //WILL LEAVE ORIGINAL- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
Hi
I made the phps safe mode off, You can check that in this image screen which phpinof() of the server.

After changing this to safe mode off also not working the file copy or directory(Empty) copy.
Thank you.
vigge89 wrote:The host might have turned PHPs safe mode on. In that case the only way for you to solve this is to ask your hosting provider.
I made the phps safe mode off, You can check that in this image screen which phpinof() of the server.
After changing this to safe mode off also not working the file copy or directory(Empty) copy.
Thank you.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
If you don't have permission to copy you certainly won't have permission to change the permissionshawleyjr wrote:Have you tried chmod()
You'll have to change the permissions over FTP where you probably own the files. Make whatver needs to be written to "777" with the CHMOD command. In this case it's the parent directory.
Hi
First of all Happy Friendship day to all.
Thanks to every body here who were trying to help me.
I just got the solution for the time being but still we have to make it perfect.
The solution mostly what i got is safe-mode off and permissions (chmod to rwx for the three users like group,owner and others) to main directory and copying file to be set to permissions of the same.
But the the thing owner and group settings are still a miserable thing but for now its working well.
Thank you very much.
First of all Happy Friendship day to all.
Thanks to every body here who were trying to help me.
I just got the solution for the time being but still we have to make it perfect.
The solution mostly what i got is safe-mode off and permissions (chmod to rwx for the three users like group,owner and others) to main directory and copying file to be set to permissions of the same.
But the the thing owner and group settings are still a miserable thing but for now its working well.
Thank you very much.