문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top