My PHP code is just a comment in my html

后端 未结 1 1243
说谎
说谎 2020-12-12 00:58

Sorry guys this is probably pretty simple, but i\'ve been up way too late now. I have a basic html page with some javascript on it, and when i try to put any php in the body

相关标签:
1条回答
  • 2020-12-12 01:13

    Sounds like you either don't have PHP installed or you're not using a file extension which invokes the PHP engine - is your file called Blah.php?

    Some things to check:

    • You're serving the file from a web server (not locally)
    • The server has PHP installed
    • PHP is configured to handle the file type you're using (usually .php)
    • creating a new file with just <?php phpinfo(); ?> and serving it should give you lots of info about your PHP install.
    • If you have access to the server, you should be able to run PHP from the command line/shell
    0 讨论(0)
提交回复
热议问题