Question

<?= 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top