PHP copy()在localhost(wamp)上工作,但不在我的真正的web域 [英] PHP copy() works on localhost(wamp) but not on my real web domain

查看:94
本文介绍了PHP copy()在localhost(wamp)上工作,但不在我的真正的web域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ok,所以我试图将 file.xml 复制到另一个位置,例如 copy('file.xml',.. / ./folder/newfile.xml);它工作正常在我的wamp虚拟服务器,但在我的真实网站它不。我认为这是与chmod相关的东西,我将 file.xml 更改为0777(使用ftp客户端)。

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?

推荐答案

这可能是因为您没有权限到您要复制到的文件夹,您的主机不会给予PHP必要的复制权限。

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.

这篇关于PHP copy()在localhost(wamp)上工作,但不在我的真正的web域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆