升級後到PHP 5.2從PHP 4.2升級PHP 4.2至5.2短開放標籤語法錯誤
<?php $test="hello world"; ?>
<?= $test ?>
返回 的hello world
但是,添加註釋斜槓給語法錯誤
<?php $test="hello world"; ?>
<?= //$test ?>
解析錯誤:語法錯誤,意外';'在第2行的/home/phpuser/docroot/lapp/test.php
添加在升級前使用的註釋斜槓,在php.ini中啓用short_open_tag。
感謝
我不明白你爲什麼不想回應。爲什麼不僅僅使用'<! - = $text ?> - >'發表評論? – BenM