Setting for <? and <? php

I am running 5.2.14. Running php code using code <?does not work. I have to use<?php

For instance:

Does not work:

<? phpinfo(); ?>

Does it work:

<?php phpinfo(); ?>

Where can I change this setting to <?work?

+3
source share
4 answers

edit yout php.ini file and install short_open_tag = On

you can view the php.ini path by executing the function phpinfo();...

but you can just write your scripts starting with <?php

Mike;]

+7
source

<? <?php. - , PHP, .

http://php.net/manual/en/ini.core.php:

PHP, (<? ?>) PHP . PHP XML, . PHP, : < ?php echo '<?xml version="1.0"?>'; ? > . , , PHP (<?php ?>).

+2

, mishunika , php.ini, , . php.ini ,

<?php

?

0

. . , . , PHP script, - , , , short_open_tag.

php.ini( ), PHP "ini_set". :

PHP ini_set

, ini_set. short_open_tag. .

-1

Source: https://habr.com/ru/post/1777096/


All Articles