Includes problem

<?php include(includes/header.php);?>


<!-- content start -->

        <h1>Hello World</h1>

<!-- content finish -->

<?php include(includes/footer.php);?>

Warning: Division by zero in C:\xampp\htdocs\site\index.php on line 1

Im getting an error on the above code, what am I doing wrong ??

Thanks in advance

Division by zero

That’s what you’re doing wrong. But I see no division at all in the code you posted. Is this the entire index.php?
If not, please post the rest. If so, please post the code of header.php

This is the entire index.php page and header and footer are empty…

Try this.


<?php include("includes/header.php"); ?>





<!-- content start -->



        <h1>Hello World</h1>



<!-- content finish -->



<?php include("includes/footer.php"); ?>

Note the “(quotes)” in (“includes/footer.php”).
Now PHP knows it’s a string so it can do something with it.
before it was trying to divide because of /
Warning: Division by zero in C:\xampp\htdocs\site\index.php on line 1
Try PHP’s manual for more information.
PHP: include - Manual

LOL :blush:

thx

Good one!