注意下面的"@" 必须要加的!否则会报错!
$link = @mysql_connect('localhost','root','root') or die("link failure"); @mysql_select_db("school"); @mysql_query("set names 'utf8'"); $info = "select * from think_user"; $result = @mysql_query($info,$link); $row = @mysql_fetch_array($result); echo '<pre>'; var_dump($row);