新版本php 5.3安装中short_tag的问题

105 篇文章 0 订阅
36 篇文章 0 订阅
  今天打算装了最新版本的php 5.3.3玩下,按原来的步骤安装后,
发现运行phpinfo居然显示空白,能查看出php的代码,搞到以为我什么地方错了,
后来一看,原来是新版本的php,对short_tag有严格的要求了,

请看;
This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: On
; Development Value: Off
; Production Value: Off
;  http://php.net/short-open-tag

在php 5.3.3下,只有两个php-development.ini和php-product.ini,
而我刚好拿了development这个ini来改,看到了吧,这个时候
short_open_tag = Off的,而我的phpinfo代码中,
是<?  ?>的,所以当然不支持拉,
所以把short_open_tag = On就没问题了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值