jason3w
jason3w

Reputation: 737

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?

i.e.
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

Upvotes: 0

Views: 174

Answers (1)

zerkms
zerkms

Reputation: 254896

No, it's not possible.

Leading / always refers to root

Upvotes: 1

Related Questions