Home > Article > Backend Development > How to enable short tags in php?
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!