|
An error occurred while printing a string on multiple lines or assigning a value to a string variable on multiple lines
The way it went wrong:
print <<< HERE
<form>
Please enter your name:
<input type = "text"
name = "userName"> <br>
<input type = "submit">
</ form>
HERE;
Error prompt: Parse error: parse error, unexpected $ end in C:\Inetpub\wwwroot\myphp\User.php on line 29
I see that many people are using the << HERE and HERE tags together to complete the assignment or printing of multi-line strings. I think this method is also very convenient, but why not on my machine
Just modify the above promise method to:
print "<form> Please enter your username: <input type = text name = userName> <br> <input type = submit name = submit> </ form>";
That ’s it. How is this going? I hope to get your help
Thank you |
|