-3

我试图在视频http://www.youtube.com/watch?v=0ol6C0ETQqM&list=PLE134D877783367C7中的代码中出错,我认为问题出在 mysql_connect

代码

<?php
$connect_error = 'Sorry we\'re experiencing connection problems.';
mysql_connect('localhst', 'root', '') or die ($connect_error);
mysql_select_db('lr'); or die ($connect_error);
?>
4

1 回答 1

0

去掉后面的分号mysql_select_db('lr')

$connect_error = "Sorry we're experiencing connection problems.";
mysql_connect('localhst', 'root', '') or die ($connect_error);
mysql_select_db('lr') or die ($connect_error);
于 2013-08-21T02:17:49.723 回答