php 定义边界符 php5 支持 ?> php边界符
程序员文章站
2022-07-13 07:58:58
...
php4 用的是 <? ?> 定义边界符
php5 用的是 <?php ?> 来定义的
所以不执行,得改好多文件
打开 php.ini 找到以下代码,把 off 改成 on 重起服务,两个就都可以用了。
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = off
php5 用的是 <?php ?> 来定义的
所以不执行,得改好多文件
打开 php.ini 找到以下代码,把 off 改成 on 重起服务,两个就都可以用了。
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = off