0

This site was made by a previous designer and the client needed some updates. The header and nav were an image file before and I recreated them as include files with CSS. I have tried different variations to input the includes and it still not showing up live.
Here is the code:

<?php require_once('includes/header.html'); ?>

<!-- main navigation -->
<?php require_once('includes/navigation.html'); ?>
<!-- end main navigation -->

Thanks!

3
Contributors
4
Replies
5
Views
4 Years
Discussion Span
Last Post by TonyG_cyprus
0

use 'include' not 'require_once'

Not sure this will help, since "include" and "require" are almost the same thing, except "require" will kill the script if the file is not found.

aglaf1979, Do you have error messages turned on? Are you getting any errors when you try to include the files? Can you show your directory structure for your files?

0

Not sure this will help, since "include" and "require" are almost the same thing, except "require" will kill the script if the file is not found.

Quite right EvolutionFallen, it was early in the am when I posted!

@aglaf1979, it may help if you post your code using the 'code' formatter, rather than using a screenshot, as well as the above.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.