Database Err: SQLSTATE[HY000] [1130] Host '43.154.25.248' is not allowed to connect to this MySQL server
- /www/wwwroot/cargosoon.com2/cargosoon/protected/lib/speed.php on line 345
340.
try {
341.
if(!class_exists("PDO") || !in_array("mysql",PDO::getAvailableDrivers(), true)){
342.
err('Database Err: PDO or PDO_MYSQL doesn\'t exist!');
343.
}
344.
$GLOBALS['mysql_instances'][$db_config_key] = new PDO('mysql:dbname='.$db_config['MYSQL_DB'].';host='.$db_config['MYSQL_HOST'].';port='.$db_config['MYSQL_PORT'], $db_config['MYSQL_USER'], $db_config['MYSQL_PASS'], array(PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES \''.$db_config['MYSQL_CHARSET'].'\''));
345.
346.
}catch(PDOException $e){err('Database Err: '.$e->getMessage());}
}
347.
return $GLOBALS['mysql_instances'][$db_config_key];
348.
}
349.
350.
private function _where($conditions){
- /www/wwwroot/cargosoon.com2/cargosoon/protected/lib/speed.php on line 315
310.
311.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
312.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
313.
$sth = $this->dbInstance($GLOBALS['mysql']['MYSQL_SLAVE'][$slave_key], 'slave_'.$slave_key)->prepare($sql);
314.
}else{
315.
316.
$sth = $this->dbInstance($GLOBALS['mysql'], 'master')->prepare($sql);
}
317.
318.
if(is_array($params) && !empty($params)){
319.
foreach($params as $k => &$v){
320.
if(is_int($v)){
- /www/wwwroot/cargosoon.com2/cargosoon/protected/lib/speed.php on line 307
302.
}
303.
}
304.
return $this->page;
305.
}
306.
307.
308.
public function query($sql, $params = array()){return $this->execute($sql, $params, true);}
public function execute($sql, $params = array(), $readonly = false){
309.
$this->sql[] = $sql;
310.
311.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
312.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
- /www/wwwroot/cargosoon.com2/cargosoon/protected/controller/BlogController.php on line 71
66.
$this->display("404.html");exit;
67.
}
68.
$blog = new Blog();
69.
$monthEn = array('01'=>'January','02'=>'February','03'=>'March','04'=>'April','05'=>'May','06'=>'June','07'=>'July','08'=>'August','09'=>'September','10'=>'October','11'=>'November','12'=>'December');
70.
$user = new User();
71.
72.
$userData = $user->query("SELECT id,englishname,image_url FROM co_users");
73.
$title = str_ireplace(':', ' ', $title);
74.
//详情
75.
$blogData = $blog->findAll(array('s_title'=>$title));
76.
if(empty($blogData)){
- /www/wwwroot/cargosoon.com2/cargosoon/protected/lib/speed.php on line 84
79.
if(!is_available_classname($__controller))_err_router("Err: Controller '$controller_name' is not correct!");
80.
if(!class_exists($controller_name, true))_err_router("Err: Controller '$controller_name' is not exists!");
81.
if(!method_exists($controller_name, $action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
82.
83.
$controller_obj = new $controller_name();
84.
85.
$controller_obj->$action_name();
86.
if($controller_obj->_auto_display){
87.
$auto_tpl_name = (empty($__module) ? '' : $__module.DS).$__controller.'_'.$__action.'.html';
88.
if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
89.
}
- /www/wwwroot/cargosoon.com2/cargosoon/index.php on line 3
1.
<?php
2.
define('APP_DIR', realpath('./'));
3.
require(APP_DIR.'/protected/lib/speed.php');