php-shorttags

Why are “echo” short tags permanently enabled as of PHP 5.4?

让人想犯罪 __ 提交于 2019-11-26 06:07:15
问题 Even the official documentation used to tell us that PHP \"short tags\" (<? /*...*/ ?>) are \"bad\". However, since PHP 5.4, the echo variety <?= /*...*/ ?> is permanently enabled regardless of the short_open_tag setting. What\'s changed? Even if they were previously discouraged solely due to the unpredictable nature of whether short_open_tag is enabled on a shared hosting platform, surely that argument doesn\'t go away just because some subset of hosts will be running PHP 5.4? Arguably this

<? ?> tags not working in php 5.3.1

ⅰ亾dé卋堺 提交于 2019-11-26 05:49:40
问题 I just installed php 5.3.1 in my linux server and now my old work which i used to write with tags is not working at all.. Please help me out.. How can i resolve this?? 回答1: To enable short tags, enable the short_open_tag ini directive in one of the following ways (most probably not all of them will work for you): set the directive short_open_tag = On in your php.ini ( the recommended way ); call ini_set("short_open_tag", 1); in your code; add the following line to your .htaccess file: php

Are PHP short tags acceptable to use?

孤者浪人 提交于 2019-11-26 05:40:51
问题 Here\'s the information according to the official documentation: There are four different pairs of opening and closing tags which can be used in PHP. Two of those, <?php ?> and <script language=\"php\"> </script> , are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended . In my

How to enable PHP short tags?

Deadly 提交于 2019-11-25 22:55:12
问题 I have a web application on a Linux server which starts with <? I needed to copy this application to a windows environment and everything is working fine except that an SQL statement is being rendered differently. I don\'t know if this has to do with the script beginning with <?php instead of <? because I don\'t know from where to enable the <? from the PHP.ini so I changed it to <?php I know that these 2 statements are supposed to mean the same but I need to test it with <? in order to