Question

While I am developing my site I have it hosted on my current site in a folder. I'm not very good with levels, but this is how I set it up. In the top of my body I have:

<?php include('../includes/menu.php'); ?>

I have my page.php in /learn/ and the classes in /learn/includes Should i do ../../ ?

PS: I'm making my first CMS

Was it helpful?

Solution

No, you would just need:

include('includes/menu.php');

OTHER TIPS

If the includes directory is inside the learn directory then you would use:

<?php include('./includes/menu.php'); ?>

or

<?php include('includes/menu.php'); ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top