如何在PHP中设置短标签(&lt ;?)? [英] How to set short tag(<?) in PHP?

查看:88
本文介绍了如何在PHP中设置短标签(&lt ;?)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将WAMPP用于PHP服务器,并且在编程短标签时使用会产生问题.我知道可以通过更改php.ini文件中的内容来实现,但是我不知道该设置如何,请为此提供帮助.

I am using WAMPP for PHP server and in programming short tag use create a problem. I knew that it possible by change something in php.ini file but I don't know the setting for that please help me for that.

示例:

<? echo "hi"; ?> //error....want to allow this also.
<?php echo "hi"; ?> //ok


我在PHP配置设置文件中找到了这个,但是我不知道需要什么更改...


I found this in PHP config setting file but what changes require I don't know...

; short_open_tag
;   Default Value: On
;   Development Value: Off
;   Production Value: Off

推荐答案

在您的php.ini中,将short_open_tag = Off更改为:

In your php.ini change the short_open_tag = Off if it's there to this:

short_open_tag = On

这篇关于如何在PHP中设置短标签(&lt ;?)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆