PHP copy() works on localhost(wamp) but not on my real web domain

会有一股神秘感。 提交于 2020-01-06 05:39:08

问题


ok so i'm trying to copy file.xml into another location something like copy('file.xml',../../folder/newfile.xml) ; it works just fine on my wamp virtual server but on my real site it doesn't. i thought that is something related to chmod and i changed the file.xml to 0777(with a ftp client).

is there something that i should put in my code to make it right? or what?


回答1:


Copy is a pretty straigtforward function. As Mark said, it's perhaps a host issue.




回答2:


It might be that you don't have permissions to the folder you are trying to copy to or as mentioned your host doesn't give PHP necessary permissions for copy.



来源:https://stackoverflow.com/questions/1699148/php-copy-works-on-localhostwamp-but-not-on-my-real-web-domain

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!