Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

How to set short tag(<?) in PHP?

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.

example:

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

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

short_open_tag = On

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.6k users

...