Php 如何解决此linux服务器-警告:copy()[function.copy]:open\u basedir限制生效
如何解决这个问题:Php 如何解决此linux服务器-警告:copy()[function.copy]:open\u basedir限制生效,php,Php,如何解决这个问题: Warning: copy() [function.copy]: open_basedir restriction in effect. File(http://pendufun.com/muzicpc/dload.php?id=443936&b=hq&cat=Hindi-Movies) is not within the allowed path(s): (D:/INETPUB/VHOSTS//runmaza.in\;C:\Windows\Temp\)
Warning: copy() [function.copy]: open_basedir restriction in effect.
File(http://pendufun.com/muzicpc/dload.php?id=443936&b=hq&cat=Hindi-Movies)
is not within the allowed path(s): (D:/INETPUB/VHOSTS//runmaza.in\;C:\Windows\Temp\) in D:\INETPUB\VHOSTS\runmaza.in\httpdocs\viruwap\download.php on line 31 Your Hosting does not allow copy function
您试图打开外部URL地址,但在php配置中禁用了
allow\u URL\u fopen
。如果可以修改php.ini
,只需执行以下操作:
allow_url_fopen = On
你试过什么吗?对file_get_contents()是否也有相同的限制?@Mike当使用任何文件函数打开远程文件中的指针时,它们都由
allow\u url\u fopen
控制。很高兴知道。谢谢。这并没有回答关于open\u basedir
notallow\u url\u fopen
的问题open\u basedir
限制应该对http://
url没有影响,但是在Windows PHP构建中copy
的实现中存在一个长期存在的错误,当设置open\u basedir
时,无论allow\u url\u fopen
的值是多少,它都无法使用url。Linux没有问题。问题的标题是错误的——这些显然是Windows路径,而不是Linux路径。