I'm working on making my web app more portable but I'm having trouble with making links in a sub-directory root-relative.
/website - Let's say that's my directory for the website.
/inc - That's my includes directory for header, footer, and eventually my config file.
Everything inside the website directory works fine.
I'm trying to include my header/footer files in a receipt directory with..
include("/website/inc/header.php");
but I get..
Warning: include(/website/inc/header.php): failed to open stream: No such file or directory in F:\xampp\htdocs\website\receipt\index.php on line 8
Warning: include(): Failed opening '/website/inc/header.php' for inclusion (include_path='.;F:\xampp\php\PEAR') in F:\xampp\htdocs\website\receipt\index.php on line 8
in my browser. I've tried removing the / and even adding localhost and htdocs
(which was just a desperate attempt at getting it to work). What am I doing wrong and how can I correct it?