Frage

<?= x ?>

That's short for <?php echo x ?> and works fine on my local Apache with PHP, but the ISS 7 PHP on the server doesn't process it.

Is there a setting i missed?

War es hilfreich?

Lösung

Yes, there is a setting in php.ini called 'short_open_tag' that should be set to on if you are using PHP prior to version 5.4.0

From the manual:

Note: This directive also affected the shorthand <?= before PHP 5.4.0, which is identical to <? echo. Use of this shortcut required short_open_tag to be on. Since PHP 5.4.0, <?= is always available.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top