[英]PHP Include Path. Can it always be from the root directory?
I'd like to reference files from the root directory even if, the file that is calling the new file, is in a directory itself. 我想从根目录中引用文件,即使正在调用新文件的文件位于目录本身中。 Possible? 可能?
ie 即
From within the /includesheader.php file: include("/styles/style.css") 从/includesheader.php文件中:include(“ / styles / style.css”)
From within the reports/customers.php file :include("/reports/sales.php") 在reports / customers.php文件中:include(“ / reports / sales.php”)
/Styles /样式
style.css style.css
/Reports /报告
sales.php sales.php
customers.php customer.php
/Includes /包括
connection.php connection.php
header.php header.php
No, it's not possible. 不,不可能。
Leading /
always refers to root 领先/
总是指根
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.