首页 > 其他 > 详细

yii2 and short_open_tag

时间:2015-01-07 12:40:07      阅读:329      评论:0      收藏:0      [点我收藏+]

在看yii2的时候, 在main文件里看到了这样一段代码

<?= Yii::$app->language ?>

而我查看了php.ini里的配置, short_open_tag=Off, 是关闭的. 

于是查了 php.net 关于 short_open_tag 的说明, 其中有一句

This directive also affected the shorthand <?= before PHP 5.4.0, which is identical to <? echo. Use of this shortcut requiredshort_open_tag to be on. Since PHP 5.4.0, <?= is always available.

大意就是指, short_open_tag 这项配置, 在 5.4.0 以前设置是生效的, 在 5.4.0 以后, 此设置不管设置为 On 或是Off 总是 On. 

yii2 and short_open_tag

原文:http://www.cnblogs.com/debmzhang/p/4207906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!