对不起,请将 php.ini 中的 short_open_tag 设置为 On.怎么做,完全不会...
4个回答
展开全部
我也正好再弄,给你解答一下,我之前也在php.ini改。结果改了还是无效,后来不小心居然 看到还有一个phpForApache.ini这个文件,原来这个才是需要改了,这里面也有short_open_tag,改为On以后,重启wamp,就OK了。没那么复杂。我的网站是:wwwxiaoyoutai.com 。刚刚做好。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在php.ini中,找到
; 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
short_open_tag = Off
将最后一行改成short_open_tag = On 然后重新服务。
; 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
short_open_tag = Off
将最后一行改成short_open_tag = On 然后重新服务。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
wamp默认有2个地方
; - short_open_tag = Off [Portability]
short_open_tag = Off
当在wamp里php里勾选short open tag时,这两个地方都变成On
需要改2个地方吗?验证ing
; - short_open_tag = Off [Portability]
short_open_tag = On 不行,重启也不行
; - short_open_tag = On [Portability]
short_open_tag = On 不行,重启也不行
把php里的short open tag勾选了,才行,php.ini都是On,其他并未改变,难道还有别的文件?
搜索发现有2个 php.ini
C:\wamp\bin\php\php5.2.8
C:\wamp\bin\apache\Apache2.2.11\bin
现在wamp里勾选,apache文件夹里的ini变成2个on,php文件夹里的还是off。
使用phpinfo查看,最终证明只有C:\wamp\bin\apache\Apache2.2.11\bin\php.ini里的一个short_open_tag = On管用,而且编辑文本不会使wamp的勾选变化。
别处找到的 希望对你有用
; - short_open_tag = Off [Portability]
short_open_tag = Off
当在wamp里php里勾选short open tag时,这两个地方都变成On
需要改2个地方吗?验证ing
; - short_open_tag = Off [Portability]
short_open_tag = On 不行,重启也不行
; - short_open_tag = On [Portability]
short_open_tag = On 不行,重启也不行
把php里的short open tag勾选了,才行,php.ini都是On,其他并未改变,难道还有别的文件?
搜索发现有2个 php.ini
C:\wamp\bin\php\php5.2.8
C:\wamp\bin\apache\Apache2.2.11\bin
现在wamp里勾选,apache文件夹里的ini变成2个on,php文件夹里的还是off。
使用phpinfo查看,最终证明只有C:\wamp\bin\apache\Apache2.2.11\bin\php.ini里的一个short_open_tag = On管用,而且编辑文本不会使wamp的勾选变化。
别处找到的 希望对你有用
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询