Simple PHP echo code not working

后端 未结 9 1023
感情败类
感情败类 2020-12-03 17:08

Here is my html with a php script:

  
      
    Bob\'s Auto Parts
  
  

        
9条回答
  •  不思量自难忘°
    2020-12-03 17:31

    In order to display PHP, or run embededded PHP, you need to tell PHP to look inside the HTM & HTML files.

    You need to have a file in the root folder of the HTML directory called .htaccess, which is a simple text file, with the following line:

    #AddType application/x-httpd-php .html .htm

    This lets the PHP compiler know to compile the php when displaying the HTML page.

提交回复
热议问题