php short_open_tag problem

前端 未结 2 1580
小蘑菇
小蘑菇 2020-12-22 05:44

hi i am working on a project of my college but my college server admin told me that we don’t use short_open_tag in our code what’s its mean? what is short open tag and what

相关标签:
2条回答
  • 2020-12-22 05:57

    You can try the tool at:

    http://blog.eezgu.com/php-short-open-tag-sorunu-ve-cozumu.html

    This is a PHP command line tool that converts short tags to normal PHP tags.

    The page is not English but you can click the link in the post and download the tool.

    0 讨论(0)
  • 2020-12-22 06:09

    Normally you write PHP like so: <?php PHP CODE HERE ?>. However if allow_short_tags directive is enabled you're able to use: <? PHP CODE HERE ?>. Also sort tags provides extra syntax: <?= $var ?> which is equal to <?php echo $var ?>.

    Short tags might seem cool but they're not. They causes only more problems. Oh... and IIRC they'll be removed from PHP6.

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