我正在尝试使用此代码从php脚本中回显表单。
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
// echo '<p>Hello World again</p>'
echo("<form action='"https://google.com/search".' method='get'>
<div class=\"form-example\">
<label for=\"name\">Enter your name: </label>
<input type=\"text\" name=\"q\" id=\"name\" required>
</div>
<input type=submit value='Submit'>
</form>");
?>
</body>
</html>
我得到的错误是:
解析错误:语法错误,hello.php中出现意外的'https'(T_STRING) 在第8行
我无法解决此错误,有什么建议吗?