數據庫鏈接錯誤/無法找到數據庫 : Access denied for user 'huimei'@'%' to database 'huimei'
- /data/project/huimeidesign/php/SpeedPHP/Drivers/mysqli.php on line 94
89.
public function __construct($dbConfig)
90.
{
91.
if(!function_exists('mysqli_connect'))spError('PHP環境未安裝MySQLi函數庫!');
92.
$linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysqli_pconnect' : 'mysqli_connect';
93.
$this->conn = $linkfunction($dbConfig['host'], $dbConfig['login'], $dbConfig['password'], $dbConfig['database'], $dbConfig['port']);
94.
95.
if(mysqli_connect_errno())spError('數據庫鏈接錯誤/無法找到數據庫 : '. mysqli_connect_error());
$this->exec("SET NAMES UTF8");
96.
}
97.
/**
98.
* 對特殊字符進行過濾
99.
*
- /data/project/huimeidesign/php/SpeedPHP/spFunctions.php on line 164
159.
}
160.
if(FALSE != $has_define){
161.
$argString = '';$comma = '';
162.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', ';}
163.
if($cache_inst) {
164.
165.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name] = new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
166.
}else {
167.
eval("\$tmpCls = new \$class_name($argString);");
168.
return $tmpCls;
169.
}
- /data/project/huimeidesign/php/SpeedPHP/Core/spModel.php on line 56
51.
}
52.
$forceInst = $GLOBALS['G_SP']['controller_other_db'] ? true : false;
53.
if($GLOBALS['G_SP']['controller_other_db'] && in_array($this->tbl_name, $GLOBALS['G_SP']['controller_other_db'])){
54.
$this->_db = spClass('db_'.$GLOBALS['G_SP']['db_other']['driver'], array(0=>$GLOBALS['G_SP']['db_other']), $GLOBALS['G_SP']['db_driver_path'], $forceInst);
55.
}else{
56.
57.
$this->_db = spClass('db_'.$GLOBALS['G_SP']['db']['driver'], array(0=>$GLOBALS['G_SP']['db']), $GLOBALS['G_SP']['db_driver_path'], $forceInst);
}
58.
}
59.
60.
/**
61.
* 從數據表中查找一條記錄
- /data/project/huimeidesign/php/SpeedPHP/spFunctions.php on line 164
159.
}
160.
if(FALSE != $has_define){
161.
$argString = '';$comma = '';
162.
if(null != $args)for ($i = 0; $i < count($args); $i ++) { $argString .= $comma . "\$args[$i]"; $comma = ', ';}
163.
if($cache_inst) {
164.
165.
eval("\$GLOBALS['G_SP']['inst_class'][\$class_name] = new \$class_name($argString);");
return $GLOBALS['G_SP']["inst_class"][$class_name];
166.
}else {
167.
eval("\$tmpCls = new \$class_name($argString);");
168.
return $tmpCls;
169.
}
- /data/project/huimeidesign/php/SpeedPHP/Extensions/spAcl.php on line 29
24.
* @param boole $jump 是否沒登錄跳走?
25.
* @return boole or exit
26.
*/
27.
public function subCheck($control, $action, $jump = true){
28.
//控制器ID
29.
30.
$controlId = spClass('m_acl')->spCache()->find(array('visit' => $control, 'pid' => 0), null, 'id');
//若是權限庫里不存在此控制器則有權限
31.
if(empty($controlId)){
32.
return true;
33.
}
34.
//沒有登錄或者超時的提醒
- /data/project/huimeidesign/php/SpeedPHP/Extensions/spAcl.php on line 16
11.
* @global type $__action 對應的動作
12.
* @return type none
13.
*/
14.
public function check(){
15.
GLOBAL $__controller, $__action;
16.
17.
if(!$this->subCheck($__controller, $__action))//沒有權限的提醒
$this->def_prompt();
18.
}
19.
20.
/**
21.
* 檢測有無權限的過程(黑名單模式:數據庫不設置權限的就是有權限,設置的需權限檢測)
- /data/project/huimeidesign/php/SpeedPHP/spFunctions.php on line 201
196.
*/
197.
function spLaunch($configname, $launchargs = null, $returns = FALSE ){
198.
if( isset($GLOBALS['G_SP']['launch'][$configname]) && is_array($GLOBALS['G_SP']['launch'][$configname]) ){
199.
foreach( $GLOBALS['G_SP']['launch'][$configname] as $launch ){
200.
if( is_array($launch) ){
201.
202.
$reval = spClass($launch[0])->{$launch[1]}($launchargs);
}else{
203.
$reval = call_user_func_array($launch, $launchargs);
204.
}
205.
if( TRUE == $returns )return $reval;
206.
}
- /data/project/huimeidesign/php/SpeedPHP/spFunctions.php on line 23
18.
return date("Y-m-d H:i:s",$dateInteger+3600*6);
19.
}
20.
function spRun(){
21.
GLOBAL $__controller, $__action;
22.
// 對路由進行自動執行相關操作
23.
24.
spLaunch("router_prefilter");
// 對將要訪問的控制器類進行實例化
25.
$handle_controller = spClass($__controller, null, $GLOBALS['G_SP']["controller_path"].'/'.$__controller.".php");
26.
// 調用控制器出錯將調用路由錯誤處理函數
27.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
28.
//header('location: /main/notfound'.$_SERVER['REQUEST_URI'].'.html');exit();//用于調試顯示哪個請求不存在
- /data/project/huimeidesign/php/index.php on line 3
1.
<?php
2.
require(SP_PATH."/SpeedPHP.php");
3.
spRun();
- /data/project/huimeidesign/web/pc/index.php on line 4
1.
<?php
2.
header('Access-Control-Allow-Origin:*');
3.
$spConfig = require(dirname(dirname(__DIR__)) . '/config/config-pc.php');
4.
require(BASE_PATH."/index.php");