php in html file
Posted: 14. June 2022 03:34
I just installed XAMP in Ubuntu 22.04 and it runs standalone php files
fine but I cant get php embedded in html to work. I have never used
XAMP with linux before... what am I doing wrong?
file name = test.html (this file does NOT run, it just shows the JS)
file name = test.php (this file runs great)
Thanks for the help
fine but I cant get php embedded in html to work. I have never used
XAMP with linux before... what am I doing wrong?
file name = test.html (this file does NOT run, it just shows the JS)
- Code: Select all
<html>
<body>
<h1>JS - Hello World</h1>
<h1><?php echo "PHP - Hello World" ?></h1> <!-- does not work -->
</body>
</html>
file name = test.php (this file runs great)
- Code: Select all
<?php
echo "hello world!";
?>
Thanks for the help