<?php
$link = mysql_connect($cfg['SQL_HOST'],$cfg['SQL_USER'],$cfg['SQL_PASS']);
if(!$link){
   die('MYSQL LINK ERROR!连接数据库失败!'.mysql_error());
}

//选择数据库
$db   = mysql_select_db($cfg['SQL_SEL'],$link) or die (file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/error/error_mysql.php'));
mysql_query("SET NAMES 'utf-8'");


?>