我对编码完全不熟悉,我目前的任务只是使用"here document"块.我对该程序的所有代码是:
<?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;
?>
Run Code Online (Sandbox Code Playgroud)
但我不断收到以下错误:
解析错误:语法错误,第2行> C:\ wamp\www\php_foothill\Week2Lab_CIS052N_heredoc_gettype.php中的意外T_SL
我正在使用Windows 7,WAMPServer 2.2,并将.php文件放在C:\ wamp\www的文件夹中