Simple PHP echo code not working

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

Here is my html with a php script:

  
      
    Bob\'s Auto Parts
  
  

        
相关标签:
9条回答
  • 2020-12-03 17:34

    Check if you have installed more than 2 versions of PHP. The server may get confused sometime regarding this. First uninstall the php versions and reinstall only one PHP version.

    0 讨论(0)
  • 2020-12-03 17:35

    Make sure the extension is .php and check echo tags on phpmanual. php.net/manual/en/function.echo.php

    When you try to include html tags inside echo function, you need to insert between "" or '' and use . between elements.

    0 讨论(0)
  • 2020-12-03 17:38

    Any of these (or more) could be your answer why it is not working

    1. Is there actually PHP running on your computer?
    2. Is the file extension .php?
    3. Are you accesing the file through your browser doing something like http://localhost/myfile.php
    4. If it is on a remote server, is there PHP installed?
    0 讨论(0)
提交回复
热议问题