浏览器访问网页显示:
Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\a\huanying.php on line 5网页源代码:
<?
// 基本设定
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql _password = "000";
$mysql_database = "wl";
//建立连接 (服务器地址、使用者名称、使用者密码)
$conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password);
//建立好您的SQL语法
$sql = "INSERT INTO `wl`.`huanying` (`new`)VALUES ('1')"; //选取您要整理的资料库
mysql_select_db($mysql_database,$conn);
//逐行执行
$result = mysql_query($sql);
//结束并释放连接
mysql_close($conn);?>
怎么回事呀,我很菜,不知道哪里错了,(看的中原大学PHP视频教程4第31分钟左右的视频教程)
Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\a\huanying.php on line 5网页源代码:
<?
// 基本设定
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql _password = "000";
$mysql_database = "wl";
//建立连接 (服务器地址、使用者名称、使用者密码)
$conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password);
//建立好您的SQL语法
$sql = "INSERT INTO `wl`.`huanying` (`new`)VALUES ('1')"; //选取您要整理的资料库
mysql_select_db($mysql_database,$conn);
//逐行执行
$result = mysql_query($sql);
//结束并释放连接
mysql_close($conn);?>
怎么回事呀,我很菜,不知道哪里错了,(看的中原大学PHP视频教程4第31分钟左右的视频教程)
$mysql _password = "000";
应为
$mysql_password = "000";
$mysql _password = "000";中间多了一个空格,应该是$mysql_password = "000";
$mysql _password = "000";中间多了一个空格,应该是$mysql_password = "000";你用的是什么软件开发的呀~一般这类错误都会提示的~