Login   Register  
PHP Classes
elePHPant
Icontem

Use of PHP short_open_tag is discouraged

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      dUnzip2  >  All threads  >  Use of PHP short_open_tag is discouraged  >  (Un) Subscribe thread alerts  
Subject:Use of PHP short_open_tag is discouraged
Summary:dZip.inc.php opens with "<?" instead of "<?php"
Messages:1
Author:Ben Johnson
Date:2010-07-29 16:58:26
 

  1. Use of PHP short_open_tag is discouraged   Reply   Report abuse  
Picture of Ben Johnson
Ben Johnson
2010-07-29 16:58:26
Hello,

For those who see the actual PHP code when attempting to include dZip.inc.php, change the opening line in dZip.inc.php from "<?" to "<?php".

On my server, I disallow short_open_tag, so PHP files that begin with <? are not parsed, and the raw file contents are output to the browser.

The use of short-tags is discouraged in most corners of the Internet, for the reason I cited above (it can expose source code when the server is configured not to allow short-tags). Further, code should be written with maximum portability, and using the full PHP tag format (e.g., <?php) always functions as expected, regardless of the short_open_tag directive's value.

More information can be found here:

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