class Tool{ static public function getLink(){ $link = new mysqli('localhost','root','','shop'); if(mysqli_connect_error()) { echo 'Could not connect to database.'; exit; } $link->query("set names gbk"); return $link; }}
转载于:https://www.cnblogs.com/cocotian/p/5056152.html
转载请注明原文地址: https://win8.8miu.com/read-12822.html