jump to navigation

PHP short open tag December 23, 2006

Posted by Olexandr Melnyk in : Programming, Web , add a comment

I’ve had a problem when using XML declaration in a web page:

<?xml version=”1.0″ encoding=”utf-8″?>

which was caused by a conflict with PHP short open tag. The solution was to disable it with .htaccess (what was allowed by my friend’s VPS, where this website is currently hosted):

php_flag short_open_tag off

This is yet another argument against using short open tag (not to mention that it’s support is likely to be dropped in PHP 6).

UPDATE: Short open tag is likely to stay in PHP 6, but because of the problems like the one described above, I would still recommend against using it.


Technorati Tags: , , ,