[英]Get path of parent file from included file in php, I don't need the folder path but the full path of including page
[英]Including a file in an included folder's parent directory fails
我的.htaccess
文件中包含一个包含某些类的文件夹。
在public_html
下的某个更深的地方,我包括该文件夹中的PHP文件。 工作正常, include_path
有效。
但是如果我写这样的话:
require_once '../DB.php';
它失败?
该文件位于随附文件夹的上方,为什么PHP引擎找不到它?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.