Jump to content

Cant use copy on a mkdir folder


johnrb87

Recommended Posts

Hi

 

I have a script

 

mkdir("myitems/images", 0777);

chmod("myitems/images", 0777);

if (!copy('downloads.zip', 'myitems/images/downloads.zip')) {
    echo "failed";
}

 

when I run it, the folder is created and when checking folder permissions, it shows 777

 

but it fails on copying the file.

 

if I manually create the folder "myitems/images/" and set it to 777, then when I run the script, the file is copied

 

for some reason when I manually create the folder it works, but when PHP creates the folder, it fails on something

 

any ideas? racking my brain trying to figure out why

Link to comment
https://forums.phpfreaks.com/topic/235202-cant-use-copy-on-a-mkdir-folder/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.