In my website, I have a header that is the same for every page, so rather than typing the code for the header in each page, I've created a file called header.php and then include it in each page using the
But when I use / instead of ../ it doesn't work, idk why?
include
statement. When I type in this, it works:
PHP:
<?php include "../_data/header.php"; ?>
But when I use / instead of ../ it doesn't work, idk why?
PHP:
<?php include "/_data/header.php"; ?>
Last edited: