29. Oct 2019 |

php does not work on website

For the first time I tried to build simple php template for my own website. I read this and this. Header, body and footer. And in the body I wanted to have additional php scripts (to define meta description and title for every site). But it did not work at first and it took me few hours to fint that:

If it does not work then change this…

<?php echo file_get_contents("html/body.php"); ?>

to this..

<?php include 'html/body.php';?>

And everything works.

Leave a Reply

Your email address will not be published. Required fields are marked *