I am working on a school project. My index works but when I click on 'Lab 1 Q1' located at labs/1/1.html it takes me to the page but my <?php include('/main-nav.php') ?> is not working. I also tried <?php include($_SERVER['DOCUMENT_ROOT']."/mobile-nav.php") ?> which did not work and I believe this is because I am currently using wamp so the 'root', I believe, is C:\wamp and inside there I have www/school/index.php.
How can I have a working file path not hard coded in?
main-nav.phprelative to the file you're including it in?