设置<?和<?php [英] Setting of <? and <?php

查看:46
本文介绍了设置<?和<?php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我现在正在使用PHP进行网络编程。对于PHP脚本,我需要使用<?php而不是<?




如何配置PHP以便它能识别<?还有吗?


提前致谢

Wing

Hi,

I''m now doing web programming using PHP. I need to use <?php instead of <?
for PHP scripts.

How do I configure PHP so that it can recognize <? as well??

Thanks in advance
Wing

推荐答案

On 2004-01-14,wing< wi ** @ wing.com>写道:
On 2004-01-14, wing <wi**@wing.com> wrote:


我现在正在使用PHP进行网络编程。对于PHP脚本,我需要使用<?php而不是<?


如何配置PHP以便它能识别<?还有??
Hi,

I''m now doing web programming using PHP. I need to use <?php instead of <?
for PHP scripts.

How do I configure PHP so that it can recognize <? as well??




short_open_tag = on


但请注意,使用时应注意一些问题

it。


-
http://home.mysth.be/~timvw


" Tim Van Wassenhove" < EU ** @ pi.be> | b?l¥ó

news:bu ************ @ID-188825.news.uni-berlin.de¤¤??? g ...
"Tim Van Wassenhove" <eu**@pi.be> |b?l¥ó
news:bu************@ID-188825.news.uni-berlin.de ¤¤???g...
2004-01-14,wing< wi ** @ wing.com>写道:
On 2004-01-14, wing <wi**@wing.com> wrote:


我现在正在使用PHP进行网络编程。我需要使用<?php而不是
<?用于PHP脚本。

如何配置PHP以便它可以识别<?还有??
short_open_tag = on

但请注意,使用
时你应该注意一些问题。
Hi,

I''m now doing web programming using PHP. I need to use <?php instead of <? for PHP scripts.

How do I configure PHP so that it can recognize <? as well??
short_open_tag = on

But be aware, there are some issues you should be aware of when using
it.



感谢您的回复,但是请指出需要注意的事项吗?


Wing


-
http://home.mysth.be/~timvw



" wing" <无线** @ wing.com>在留言新闻中写道:< bu ********** @ news.ust.hk> ...
"wing" <wi**@wing.com> wrote in message news:<bu**********@news.ust.hk>...


我是现在使用PHP进行Web编程。对于PHP脚本,我需要使用<?php而不是<?


如何配置PHP以便它能识别<?还有吗?

提前致谢
Wing
Hi,

I''m now doing web programming using PHP. I need to use <?php instead of <?
for PHP scripts.

How do I configure PHP so that it can recognize <? as well??

Thanks in advance
Wing




查看* php.ini *文件中的以下部分。 />

[SNIP]


;允许<?标签。否则,只有<?php和< script>标签是

认可。

;注意:开发

应用程序或

时应避免使用短标签;用于在PHP上重新分发或部署的库

;不受你控制的服务器,因为短标签可能不是
;在目标服务器上受支持。对于便携式,可再发行的

代码,

;一定不要使用短标签。

short_open_tag =开


[/ SNIP]


你可以启用或者通过在php.ini文件中分别写入或关闭
来禁用* short_open_tag *(<?)。


-

干杯,

Rahul



Review the following section in *php.ini* file.

[SNIP]

; 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 = On

[/SNIP]

You can enable or disable *short_open_tag* (<?) by writing On or Off
respectively in your php.ini file.

--
Cheers,
Rahul


这篇关于设置&lt;?和&lt;?php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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