我收到此错误: 解析错误:语法错误,意外T_VARIABLE,期待','或';'在第16行的C:\ wamp \ www \ test \ seta2.php
我的错误
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
$grting = "Wellcome to php";
echo "Hello World! ";
echo "Hello World! ";
echo "Hello World! ";
echo "Hello World! ";
echo "Hello World! ";
echo ($grting)
$con = mysql_connect('localhost','root','');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
</body>
</html>
答案 0 :(得分:3)
你错过了一个分号:
echo ($grting)
应该是
echo ($grting);
答案 1 :(得分:1)
您在这里缺少;
echo ($grting);
答案 2 :(得分:1)
echo ($grting)
答案 3 :(得分:0)
;
之后您遗漏了echo ($grting)
。括号是不必要的,可能隐藏了你的错误原因。