这个错误很常见,通常意味着它找不到要查找的文件,但我可以在目录中看到文件?!
完全错误:
警告:require(/home/coinsfut/public_html/files/core.php)[function.request]:无法打开流:在第4行的/home/consfut/public_html/new/index.php中没有这样的文件或目录
第4行写着:
require $_SERVER['DOCUMENT_ROOT']. "/files/core.php";
该站点托管在/new
中
有什么想法吗?
再次检查警告。您正在尝试包含
/home/coinsfut/public_html/files/core.php
当你想要的时候
/home/coinsfut/public_html/new/files/core.php
请尝试
require $_SERVER['DOCUMENT_ROOT']. "/new/files/core.php";
它应该很好用。
您可以使用的替代方案
require "files/core.php";
将文件包含在相对的子目录中,因为您的index.php位于"new"目录中。