简体   繁体   中英

Zend Framework Script Tag <?=

I'm just introducing myself to ZF after about a year of OO-PHP experience. The book I've started with uses:

<?=

in places instead of

<?php echo

The author seems pretty confident that this will output the data, instead of the actual code, however, it doesn't seem to be working for me, as I've had to use the normal method instead.

Has anyone used the former instead of the latter succesfully? Any advice on configuration etc... that might cause this to break for me? Have installed ZF 1.11.11

Yes, <?= should work fine:

Do note, however, that before PHP 5.4.0 , short_open_tag must be On in php.ini for that to work:

http://www.php.net/manual/en/ini.core.php#ini.short-open-tag

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM