我对编码完全陌生,我目前的任务只是使用“此处文档”块。我为该程序提供的所有代码是:
<?php
$firstphpstring = <<<ONTOTHENEXTONE
I have now coded my first block to be displayed
in my very first web page.I am excited to see what the
next several weeks have in stored.
ONTOTHENEXTONE;
echo $firstphpstring;
?>
但我不断收到以下错误:
解析错误:语法错误,第 2 行 > C:\wamp\www\php_foothill\Week2Lab_CIS052N_heredoc_gettype.php 中的意外 T_SL
我正在使用 Windows 7、WAMPServer 2.2,并将 .php 文件放在 C:\wamp\www 的文件夹中