0

If I make a standalone script, it works. (example www.mywebserver.com/test.php). when it is embed it in a html file, I get no output, and calling it remotely does not work either. please help this beginner figure out what I am doing wrong.

<!DOCTYPE html>
<html>
<head>
<title>PHP! </title>
</head>
<body>
<?php
echo "test";
?>
</body>
</html>
  • how is it *embeded* ? –  Nov 22 '15 at 20:02
  • *"when it is embed it in a html file, I get no output"* in `.html`????? if so, you have to instruct Apache to treat those AS PHP. Yeah, that's gotta be it. Closed "as per" dupe. – Funk Forty Niner Nov 22 '15 at 20:02
  • What do you mean by "embed it in an HTML file"? If you file's extension really is `.html` then your web server won't process PHP code in it by default. The extension should be `.php`. – David Nov 22 '15 at 20:03
  • Thank you! I got it now! – JJGreive Nov 22 '15 at 20:14

0 Answers0