新版本php 5.3安装中short_tag的问题
来源:互联网 发布:单片机的内部资源 编辑:程序博客网 时间:2024/06/06 13:57
今天打算装了最新版本的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就没问题了
发现运行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就没问题了
- 新版本php 5.3安装中short_tag的问题
- 安装新版本python出现乱码的问题
- 在新版本的php中使用旧的php代码
- 在新版本的 PHP 中使用旧的 PHP 代码
- 新版本PHP以上------5.3.3 中 php-fpm 的重启、终止操作命令
- linux中安装新版本python之后yum无法使用的问题
- 安装新版本的cmake
- 新版本的问题
- 新版本的CVS问题
- 新版本eclipse无法安装FatJar插件的问题
- PHP安装中出现的问题
- apache2, php, mysql新版本安装源
- Linux安装新版本的Firfox
- 5. 在新版本的 PHP 中使用旧的 PHP 代码
- 如何在新版本的php中使用旧版php语言风格
- fedora gstreamer 新版本安装不成功问题
- fedora下新版本jdk安装问题
- android安装新版本,双进程问题
- 需要车牌的训练样本图片,到哪里去找呢?
- 对比RAID1和RAID5
- 再次提醒各位struts2的用户注意这个超级安全漏洞
- 学友新碟<<private corner迷你音乐会>>CD/DVD超赞呀
- 交换资料,结识朋友,广州的朋友来看,送书了
- 新版本php 5.3安装中short_tag的问题
- Android调用Servlet与MySQL交互
- 介绍一个监控软件dstat
- (转)ext4文件系统新特性
- (转)四大主流PHP开发框架
- 6顶帽子的小结学习
- codeigniter 学习1
- flex 4里一个传统的闪烁效果
- codeigniter学习2