Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 162010

What is the PHP's short_open_tag


PHP's short_open_tag is a way to use PHP in a PHP script without the normal PHP tag, e.g.

Instead of

# <?php echo "hello world"; ?>

You can use a simplified version.

# <? echo "hello world"; ?>

Although it is not recommended, if you want to set it, you can enable it by editing the php.ini

vi /etc/php.ini

Locate and set

short_open_tag = On

Also, remember to restart web server such as Apache if needed.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>