Home  >  Article  >  Backend Development  >  How to enable short tags in php?

How to enable short tags in php?

怪我咯
怪我咯Original
2017-07-14 10:35:303069browse

The short tag is only used to output variable or expression. The general usage is

<?=$a?>
<?=(表达式)?>

is equivalent to
037e82d85078656685e53062533321d7
fb4dc8039f835f7657668f4310ccccf2

The first is according to the standard writing method of PHP.0b72fefc054536df359196b18c57e3ed

The way to open the short tag is as follows

The second is to modify the value of short_open_tag in the config file(php.ini) to on.

If set to Off, PHP files similar to this form cannot be parsed normally:

<?
phpinfo()
?>

but can only parse

<?php
phpinfo()
?>

This form of php file
So if we want php to support short tags, we need to set short_open_tag

to On.

The above is the detailed content of How to enable short tags in php?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn