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

有帮助吗?

解决方案

No, you would just need:

include('includes/menu.php');

其他提示

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

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

or

<?php include('includes/menu.php'); ?>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top