Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/119.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 尽管我已经更改了short\u open\u tag=On(我有mac os x),但短标签还是不起作用_Php_Apache2 - Fatal编程技术网

Php 尽管我已经更改了short\u open\u tag=On(我有mac os x),但短标签还是不起作用

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

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 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