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");
尝试这个:
chmod("full-path-of-file",0777);
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.