If I have a file, file.php, in the same directory as index.html:
file.php:
<?php
echo "<body><img src=\"hi.jpg\" /><br /><p>I was here</p>"
?>
index.html:
<html>
<head></head>
<!-- I want to enter the PHP in file.php here --></body>
</html>
How do I put file.php in index.html?
Rename index.html
to index.php
, and fill it with the following:
<html>
<head></head>
<?php
require('./file.php');
?>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With