2013年4月7日 星期日
PHP enable =$var1?> tag
Installed a new server with apache and deployed a php application to it..
When running the php code, the page returns <?=$var1?> instead of showing the value of the variable $var1.
It is due to the configuration in php.ini... short_open_tag is set to be "Off" by default.
short_open_tag=on
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言