如何在正常的PHP文件上的Codeigniter中使用require_once php函数?我是,目前出现错误。

代码:
require_once($_SERVER['DOCUMENT_ROOT'].'/php/jformer.php');
错误:
Message: require_once() [function.require-once]: http:// wrapper is disabled in the server configuration by allow_url_include=0Message: require_once(http://localhost/site/php/jformer.php) [function.require-once]: failed to open stream: no suitable wrapper could be found

最佳答案

您无需为此使用$_SERVER['DOCUMENT_ROOT'],而是要使用APPPATHBASEPATH,或仅键入文件的完整路径。 require_once应该传递一个本地文件,而不是URL。

关于php - 在Codeigniter中使用require_once,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6734976/

10-14 15:05
查看更多