php 定义边界符 php5 支持 ?> php边界符
程序员文章站
2022-07-13 07:59:16
...
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
推荐阅读
-
[PHP基础] 安装环境phpstudy、变量赋值、变量类型、预定义常量、运算符
-
php 定义边界符 php5 支持 ?> php边界符
-
php 定义边界符 php5 支持 ?> php边界符
-
自定义范围,自定义运算符,自定义运算次数_PHP教程
-
PHP 7.1是否支持操作符重载?
-
php数组的foreach和for遍历循环,以及系统函数,自定义函数的使用,数组遍历的模板语法以及定界符单引号双引号的使用
-
php数组的foreach和for遍历循环,以及系统函数,自定义函数的使用,数组遍历的模板语法以及定界符单引号双引号的使用
-
[PHP基础] 安装环境phpstudy、变量赋值、变量类型、预定义常量、运算符
-
PHP不支持的修饰符
-
PHP不支持的修饰符