开发者

php short_open_tag problem

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 sho开发者_JAVA百科rt open tag and what is alternate of it

thanks


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜