PHP gets commented out in HTML

后端 未结 6 915
名媛妹妹
名媛妹妹 2020-12-05 06:59

I created a simple HTML webpage that includes the following PHP code in the HTML code.


When I run

6条回答
  •  长情又很酷
    2020-12-05 07:36

    I had the same problem and fixed it by changing the URL from file://www/[Project] to localhost/[Project].

    Even if the file is saved as a .php, it will comment out the PHP if the file is opened from the file system.

提交回复
热议问题