Hi all,
I am working on a conference website. I want to have a separate navigation file and include this file in all the other pages, so if changes need to be made on the navigation menu, I only need to update one page instead of every page.
I tried the following using PHP, but neither is working. Please help.
In the file, about.html, I cut the navigation menu code, insert the following line: <?php include('navig.html'); ?>, and paste the navigation code into a file and name it "navig.html".
I also tried
<?php
$filename="navig.html";
$fd = fopen ($filename, "rb", 0);
$contents = fread($fd, filesize($filename));
fclose($fd);
echo $contents;
}?>
For both times, there is no navigation menu on the page, and when I look at the source code for about.html, the
PHP section is gone.
I would appreciate any comment or suggestion. Thank you very much!
Catherine