Reputation: 393
I am using php copy() function and it works fine, the only thing is when I copy the file the permissions are set to: -rw-r--r-- and I would like to make them readable and writable (777)
is this possible?
copy("../virtual-tours/PTGuiViewer.js", "../virtual-tours/" . $brandNewFolderName . "/PTGuiViewer.js");
Upvotes: 0
Views: 5465
Reputation: 111829
You need to use chmod
as below:
copy("../virtual-tours/PTGuiViewer.js", "../virtual-tours/" . $brandNewFolderName . "/PTGuiViewer.js");
chmod("../virtual-tours/" . $brandNewFolderName . "/PTGuiViewer.js", 0777);
Notice: Leading zero in 0777
is important.
Upvotes: 3