Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 语句: "mysql_connect('localhost', 'shores') failed!"
SQL 错误代码: "7335942".
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA.php [747]
#8 FLEA_Db_Driver_Mysql::connect()
ARGS:
Array
(
)
SOURCE CODE:
| 737 |
|
| 738 |
$driver = ucfirst(strtolower($dsn['driver']));
|
| 739 |
$className = 'FLEA_Db_Driver_' . $driver;
|
| 740 |
if ($driver == 'Mysql' || $driver == 'Mysqlt') {
|
| 741 |
require_once(FLEA_DIR . '/Db/Driver/Mysql.php');
|
| 742 |
} else {
|
| 743 |
FLEA::loadClass($className);
|
| 744 |
}
|
| 745 |
$dbo =& new $className($dsn);
|
| 746 |
/* @var $dbo FLEA_Db_Driver_Abstract */
|
| 747 |
$dbo->connect();
|
| 748 |
|
| 749 |
$GLOBALS[G_FLEA_VAR]['DBO'][$dsnid] =& $dbo;
|
| 750 |
return $GLOBALS[G_FLEA_VAR]['DBO'][$dsnid];
|
| 751 |
}
|
| 752 |
|
| 753 |
/**
|
| 754 |
* 分析 DSN 字符串或数组,返回包含 DSN 连接信息的数组,失败返回 false
|
| 755 |
*
|
| 756 |
* @param string|array $dsn
|
| 757 |
*
|
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA/Db/TableDataGateway.php [301]
#7 FLEA::getDBO()
ARGS:
Array
(
)
SOURCE CODE:
| 291 |
// 当 skipInit 为 true 时,不初始化表数据入口对象
|
| 292 |
if (isset($params['skipConnect']) && $params['skipConnect'] != false) {
|
| 293 |
return;
|
| 294 |
}
|
| 295 |
|
| 296 |
// 初始化数据访问对象
|
| 297 |
if (!isset($params['dbo'])) {
|
| 298 |
if (isset($params['dbDSN'])) {
|
| 299 |
$dbo =& FLEA::getDBO($params['dbDSN']);
|
| 300 |
} else {
|
| 301 |
$dbo =& FLEA::getDBO();
|
| 302 |
}
|
| 303 |
} else {
|
| 304 |
$dbo =& $params['dbo'];
|
| 305 |
}
|
| 306 |
$this->setDBO($dbo);
|
| 307 |
|
| 308 |
// 当 skipCreateLinks 不为 true 时,建立关联
|
| 309 |
if (!isset($params['skipCreateLinks']) || $params['skipCreateLinks'] == false) {
|
| 310 |
$this->relink();
|
| 311 |
}
|
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA.php [423]
#6 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
| 413 |
} else {
|
| 414 |
$classExists = class_exists($className);
|
| 415 |
}
|
| 416 |
if (!$classExists) {
|
| 417 |
if (!FLEA::loadClass($className)) {
|
| 418 |
$return = false;
|
| 419 |
return $return;
|
| 420 |
}
|
| 421 |
}
|
| 422 |
|
| 423 |
$instances[$className] =& new $className();
|
| 424 |
FLEA::register($instances[$className], $className);
|
| 425 |
return $instances[$className];
|
| 426 |
}
|
| 427 |
|
| 428 |
/**
|
| 429 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
| 430 |
*
|
| 431 |
* example:
|
| 432 |
* <code>
|
| 433 |
* $obj =& new MyClass();
|
Filename: /others/www/fabcms/2shores/uo/APP/Controller/Login.php [43]
#5 FLEA::getSingleton('Model_Groups')
ARGS:
Array
(
[0] => Model_Groups
)
SOURCE CODE:
| 33 |
$view->set_result($this->viewdata);
|
| 34 |
}
|
| 35 |
|
| 36 |
|
| 37 |
/**
|
| 38 |
* 显示登录界面
|
| 39 |
*/
|
| 40 |
function actionIndex()
|
| 41 |
{
|
| 42 |
// 记录组变化 缓存文件 首页显示最新组列表
|
| 43 |
$class_group = FLEA::getSingleton('Model_Groups');
|
| 44 |
FLEA::loadFile('FLEA_Helper_Array');
|
| 45 |
$__temp__ = $class_group->findAll(null,"group_id desc",20,"groupname",false);
|
| 46 |
$_temp_ = array_col_values($__temp__,"groupname");
|
| 47 |
$groupsname = implode(" , ",$_temp_);
|
| 48 |
$this->viewdata['groupsname'] = $groupsname;
|
| 49 |
|
| 50 |
$this->_doView();
|
| 51 |
$this->_executeView(APP_DIR . '/View/default_index.php', $this->viewdata);
|
| 52 |
}
|
| 53 |
|
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA/Dispatcher/Simple.php [120]
#4 Controller_Login::actionIndex()
ARGS:
Array
(
)
SOURCE CODE:
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
| 117 |
$controller->_beforeExecute($actionMethod);
|
| 118 |
}
|
| 119 |
// 执行 action 方法
|
| 120 |
$ret = $controller->{$actionMethod}();
|
| 121 |
// 调用 _afterExecute() 方法
|
| 122 |
if (method_exists($controller, '_afterExecute')) {
|
| 123 |
$controller->_afterExecute($actionMethod);
|
| 124 |
}
|
| 125 |
return $ret;
|
| 126 |
} while (false);
|
| 127 |
|
| 128 |
if ($callback) {
|
| 129 |
// 检查是否调用应用程序设置的错误处理程序
|
| 130 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA/Dispatcher/Auth.php [127]
#3 FLEA_Dispatcher_Simple::_executeAction('login', 'index', 'Controller_Login')
ARGS:
Array
(
[0] => login
[1] => index
[2] => Controller_Login
)
SOURCE CODE:
| 117 |
* @return mixed
|
| 118 |
*/
|
| 119 |
function dispatching()
|
| 120 |
{
|
| 121 |
$controllerName = $this->getControllerName();
|
| 122 |
$actionName = $this->getActionName();
|
| 123 |
$controllerClass = $this->getControllerClass($controllerName);
|
| 124 |
|
| 125 |
if ($this->check($controllerName, $actionName, $controllerClass)) {
|
| 126 |
// 检查通过,执行控制器方法
|
| 127 |
return $this->_executeAction($controllerName, $actionName, $controllerClass);
|
| 128 |
} else {
|
| 129 |
// 检查失败
|
| 130 |
$callback = FLEA::getAppInf('dispatcherAuthFailedCallback');
|
| 131 |
|
| 132 |
$rawACT = $this->getControllerACT($controllerName, $controllerClass);
|
| 133 |
if (is_null($rawACT) || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
$args = array($controllerName, $actionName, $controllerClass, $ACT, $roles);
|
| 137 |
|
Filename: /others/www/fabcms/2shores/FLEA.LIB/FLEA.php [811]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 801 |
require_once($MVCPackageFilename);
|
| 802 |
}
|
| 803 |
FLEA::init();
|
| 804 |
|
| 805 |
// 载入调度器并转发请求到控制器
|
| 806 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 807 |
FLEA::loadClass($dispatcherClass);
|
| 808 |
|
| 809 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 810 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 811 |
$dispatcher->dispatching();
|
| 812 |
}
|
| 813 |
|
| 814 |
/**
|
| 815 |
* 准备运行环境
|
| 816 |
*
|
| 817 |
* @param boolean $loadMVC
|
| 818 |
*/
|
| 819 |
function init($loadMVC = false)
|
| 820 |
{
|
| 821 |
static $firstTime = true;
|
Filename: /others/www/fabcms/2shores/uo/index.php [38]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 28 |
|
| 29 |
/**
|
| 30 |
* 指定找不到控制器或动作方法时要调用的错误处理过程
|
| 31 |
*/
|
| 32 |
FLEA::setAppInf('dispatcherFailedCallback', 'page_404');
|
| 33 |
|
| 34 |
// 导入应用程序对象搜索路径
|
| 35 |
FLEA::import(APP_DIR);
|
| 36 |
|
| 37 |
// 启动 MVC 模式,并运行应用程序
|
| 38 |
FLEA::runMVC();
|
| 39 |
|
| 40 |
|
| 41 |
/**
|
| 42 |
* 当指定的控制器或者动作不存在时调用此方法
|
| 43 |
*
|
| 44 |
* 开发者可以在此方法中显示更友好的错误信息
|
| 45 |
*/
|
| 46 |
function page_404($controller, $action)
|
| 47 |
{
|
| 48 |
echo "请求的控制器 \"{$controller}\" 没有找到,或者该控制器的动作 \"{$action}\" 没有定义。";
|