Php 尽管我已经更改了short\u open\u tag=On(我有mac os x),但短标签还是不起作用
php.ini:Php 尽管我已经更改了short\u open\u tag=On(我有mac os x),但短标签还是不起作用,php,apache2,Php,Apache2,php.ini: ; short_open_tag ; Default Value: On ; Development Value: Off ; Production Value: Off 您应该如下所示: ; This directive determines whether or not PHP will recognize code between ; <? and ?> tags as PHP source which should be processed a
; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off
您应该如下所示:
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
更新后还要重新启动web服务器。添加到php.ini
短\打开\标记=打开
然后重新启动服务器,有关更多信息,请查看附带的屏幕截图
谢谢
阿米特那太好了。可能有一个简单的解决方法。你想念的人。再检查一遍你是否意识到一个
是一个注释标记,文件顶部的那些行仅用于提供信息。在php.ini
中向下查看实际的short\u open\u标记
参数,然后重新启动web服务器
; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off