Question mark equals, doesn't work on php

后端 未结 3 581
灰色年华
灰色年华 2020-12-20 18:14

this is my php code:

Hey!: 

It just prints \"Hey!:\" Whats wrong wi

相关标签:
3条回答
  • 2020-12-20 18:58

    You need to set short_open_tag to 1

    http://php.net/manual/en/ini.core.php

    0 讨论(0)
  • 2020-12-20 19:11

    Short tags (which you're using here) can be turned on or off depending on the server you're running the code on. If it's your server, look in php.ini

    0 讨论(0)
  • 2020-12-20 19:18

    Does your file end in .php and will it execute as php on your webserver? add

    <?php echo "yes I run php!<br>\n"; ?>
    

    to your file to be sure. View source to see what happened to the php tags. Then maybe switch on short tags as the other answers told you to.

    0 讨论(0)
提交回复
热议问题