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")
From within the reports/customers.php file :include("/reports/sales.php")
/Styles
style.css
/Reports
sales.php
customers.php
/Includes
connection.php
header.php
No, it's not possible.
Leading /
always refers to root
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.