I've found lots of iterations of this question. Most solutions are something like, "take the header that should be on all pages and turn it into an html file, like this:
(One example that I've tried to put in a file called header.php)
<!--PAGE HEADER-->
<div width="100%">
<img src="images/headerimage.jpg" height="240">
</div>
"Then make that header.php. Then insert the file into each page in the site like this" -
<?php include 'header.php';?>
I have tried and tried many different combinations of file paths, existing php code that I know works, examples off of the internet. It doesn't work. When I view the source code, i just see:
<?php include 'header.php';?>
It shows up red (Firefox inspector). As far as I understand it, I should see the imported page header code in its place. The code hasn't been imported. And none of the code from header.php gets run.
It looks so easy, I have followed tutorials on Youtube, for them it works, for me, nothing. I have tried setting up Apache server and running it (not really knowing what I was doing though).