1.原生连接代码
$test = "SELECT count(*) count from dede_userphone where phone=".$mobile; $coon = @mysql_connect('$host','$user','$password'); @mysql_query("SET NAMES UTF8"); @mysql_select_db('dede_qizheng',$coon); $res = @mysql_query($test,$coon); while($re = mysql_fetch_array($res)) { array_push($arr,$re); } echo '<pre class="brush:php;toolbar:false">'; var_dump($arr); exit;