php使用include报错require_once(../include.php): failed to open stream: No such file or directo
Posted 锋齐叶落
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php使用include报错require_once(../include.php): failed to open stream: No such file or directo相关的知识,希望对你有一定的参考价值。
引入路径的问题,建议加入
include_once $_SERVER[\'DOCUMENT_ROOT\']."/include.php";
意思是获取网站根目中的include.php
截图如下:
以上是关于php使用include报错require_once(../include.php): failed to open stream: No such file or directo的主要内容,如果未能解决你的问题,请参考以下文章
require(),include(),require_once()和include_once()区别
「PHP」include()include_once()require()require_once()的用法及区别
PHP内的包含语句(include(),require(),include_once(),require_once())