输出显示一个空白页


Output is showing a blank page

5并且我正在使用jumi组件来运行php文件。当我使用requireonce函数时,有些文件运行得很好,但有些并不特别。错误显示如下:

警告:require_one(http://bphf2012.org/..._jumi&fileid=10)[function.request-onex]:无法打开流:在/home/content/13/10377813/html/contensions/com_jumi/views/application/view.html.php(40):eval()的第21行代码中没有这样的文件或目录

致命错误:requireonce()[function.request]:在/home/content/13/10377813/html/contensions/com_jumi/views/application/view.html.php(40):在第21行打开必需的"http://bphf2012.org/..._jumi&fileid=10"(include_path='.:/usr/local/php5_3/lib/php')失败

如何解决问题?

您正在使用的require_one方法不适用于外部URLS。本地文件和外部文件之间有区别。您正试图要求一个外部文件。对于外部文件(在本例中为网页),可以使用curl(http://php.net/manual/en/book.curl.php)或file_get_contents(http://php.net/manual/en/function.file-get-contents.php)

如果文件在您的本地磁盘上,则需要+一次磁盘上的文件路径。

需要('/home/content/13/10377813/html/contensions/com_jumi/views/application/view.html.php')

如果您真的想包含远程文件,请将allow_url_include设置为On。

在这里阅读更多-包括PHP 中的远程文件