Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Access denied for user 'tstcarbon'@'localhost' (using password: YES)"
SQL 语句: "mysql_connect('127.0.0.1', 'tstcarbon') failed!"
SQL 错误代码: "7335941".
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA.php [751]
#13 FLEA_Db_Driver_Mysql::connect()
ARGS:
Array
(
)
SOURCE CODE:
741 |
|
742 |
$driver = ucfirst ( strtolower ( $dsn ['driver'] ) );
|
743 |
$className = 'FLEA_Db_Driver_' . $driver;
|
744 |
if ($driver == 'Mysql' || $driver == 'Mysqlt') {
|
745 |
require_once (FLEA_DIR . '/Db/Driver/Mysql.php');
|
746 |
} else {
|
747 |
FLEA::loadClass ( $className );
|
748 |
}
|
749 |
$dbo = & new $className ( $dsn );
|
750 |
/* @var $dbo FLEA_Db_Driver_Abstract */
|
751 |
$dbo->connect ();
|
752 |
|
753 |
$GLOBALS [G_FLEA_VAR] ['DBO'] [$dsnid] = & $dbo;
|
754 |
return $GLOBALS [G_FLEA_VAR] ['DBO'] [$dsnid];
|
755 |
}
|
756 |
|
757 |
/**
|
758 |
* 分析 DSN 字符串或数组,返回包含 DSN 连接信息的数组,失败返回 false
|
759 |
*
|
760 |
* @param string|array $dsn
|
761 |
*
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA\Db\TableDataGateway.php [301]
#12 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: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA.php [427]
#11 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
417 |
} else {
|
418 |
$classExists = class_exists ( $className );
|
419 |
}
|
420 |
if (! $classExists) {
|
421 |
if (! FLEA::loadClass ( $className )) {
|
422 |
$return = false;
|
423 |
return $return;
|
424 |
}
|
425 |
}
|
426 |
|
427 |
$instances [$className] = & new $className ( );
|
428 |
FLEA::register ( $instances [$className], $className );
|
429 |
return $instances [$className];
|
430 |
}
|
431 |
|
432 |
/**
|
433 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
434 |
*
|
435 |
* example:
|
436 |
* <code>
|
437 |
* $obj =& new MyClass();
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA\Compatibility.php [115]
#10 FLEA::getSingleton('model_infoCate')
ARGS:
Array
(
[0] => model_infoCate
)
SOURCE CODE:
105 |
/**
|
106 |
* 返回指定对象的唯一实例(已经过时,用 FLEA::getSingleton() 代替)
|
107 |
*
|
108 |
* @param string $className
|
109 |
*
|
110 |
* @return object
|
111 |
* @deprecated
|
112 |
*/
|
113 |
function & get_singleton($className)
|
114 |
{
|
115 |
return FLEA::getSingleton($className);
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
* 将一个对象实例注册到对象实例容器(已经过时,用 FLEA::register() 代替)
|
120 |
*
|
121 |
* @param object $obj
|
122 |
* @param string $name
|
123 |
*
|
124 |
* @return object
|
125 |
* @deprecated
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\app\util\common.php [80]
#9 get_singleton()
ARGS:
SOURCE CODE:
70 |
$encode_arr = array( "ASCII","CP936", "GBK", "GB2312", "BIG5","ISO-8859-1", "JIS", "eucjp-win", "sjis-win", "EUC-JP","UTF-8");
|
71 |
$encoded = mb_detect_encoding( $data, $encode_arr);
|
72 |
return mb_convert_encoding( $data, 'utf-8', $encoded );
|
73 |
}
|
74 |
|
75 |
/* --------------------限制与具体架构中的通用函数------------------------ */
|
76 |
/**
|
77 |
* 获取数据层类
|
78 |
*/
|
79 |
function get_model($ado) {
|
80 |
return get_singleton ( 'model_' . $ado );
|
81 |
}
|
82 |
/* ------------------------SOA---------------------------- */
|
83 |
/**
|
84 |
* 图片上传
|
85 |
* @param string $dir 存储路径
|
86 |
* @param string $photoName 图片名称
|
87 |
* @param string $formName 表单获取值
|
88 |
* @return 成功返回图片名称 失败返回false
|
89 |
*/
|
90 |
function upload_photo($dir, $photoName = null, $formName = 'photo') {
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\app\base\controller.php [9]
#8 get_model()
ARGS:
SOURCE CODE:
1 |
<?php
|
2 |
class base_controller extends FLEA_Controller_Action {
|
3 |
|
4 |
var $smarty;
|
5 |
|
6 |
function base_controller() {
|
7 |
$this->smarty = &$this->_getView ();
|
8 |
|
9 |
$smess=get_model('infoCate');
|
10 |
$this->s_assign('infoall',$smess->findAll(NULL,'number asc'));
|
11 |
$infoc=get_model('infoCate');
|
12 |
$infotitle = $infoc->findAll(array('p_id'=>'x','hidden'=>'0'),'number asc');
|
13 |
$this->s_assign('infotitle',$infotitle);
|
14 |
|
15 |
}
|
16 |
|
17 |
/**
|
18 |
* smarty简写
|
19 |
*/
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\app\base\mai\controller.php [6]
#7 base_controller::base_controller('model_infoCate')
ARGS:
Array
(
[0] => model_infoCate
)
SOURCE CODE:
1 |
<?php
|
2 |
FLEA::loadClass ( 'base_controller' );
|
3 |
class base_mai_controller extends base_controller {
|
4 |
|
5 |
function base_mai_controller() {
|
6 |
parent::base_controller ();
|
7 |
//初始化系统参数
|
8 |
|
9 |
$config = get_model('config');
|
10 |
$cos = $config->findAll();
|
11 |
$ins = array();
|
12 |
foreach ($cos as $key => $value){
|
13 |
$ins[$value['name']] = $value['value'];
|
14 |
}
|
15 |
$this->s_assign ('inis', $ins);
|
16 |
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\app\controller\default.php [7]
#6 base_mai_controller::base_mai_controller('infoCate')
ARGS:
Array
(
[0] => infoCate
)
SOURCE CODE:
1 |
<?php
|
2 |
|
3 |
FLEA::loadClass ( 'base_mai_controller' );
|
4 |
class controller_default extends base_mai_controller {
|
5 |
|
6 |
function controller_default() {
|
7 |
parent::base_mai_controller ();
|
8 |
|
9 |
$main = get_model('photo');
|
10 |
$this->s_assign('hdp' , $main->findAll(array(),"number desc",5));
|
11 |
|
12 |
|
13 |
}
|
14 |
function actionIndex() {
|
15 |
$main = get_model('showmess');
|
16 |
$cmain = get_model('photo1');
|
17 |
$this->s_assign('hdpx' , $cmain->findAll(array(),"number desc",10));
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA\Dispatcher\Simple.php [106]
#5 controller_default::controller_default()
ARGS:
Array
(
)
SOURCE CODE:
96 |
|
97 |
$controller = null;
|
98 |
$controllerClassFilename = null;
|
99 |
do {
|
100 |
// 载入控制对应的类定义
|
101 |
if (!$this->_loadController($controllerClass)) { break; }
|
102 |
|
103 |
// 构造控制器对象
|
104 |
FLEA::setAppInf('FLEA.internal.currentControllerName', $controllerName);
|
105 |
FLEA::setAppInf('FLEA.internal.currentActionName', $actionName);
|
106 |
$controller = new $controllerClass($controllerName);
|
107 |
if (!method_exists($controller, $actionMethod)) { break; }
|
108 |
if (method_exists($controller, '__setController')) {
|
109 |
$controller->__setController($controllerName, $actionName);
|
110 |
}
|
111 |
if (method_exists($controller, '__setDispatcher')) {
|
112 |
$controller->__setDispatcher($this);
|
113 |
}
|
114 |
|
115 |
// 调用 _beforeExecute() 方法
|
116 |
if (method_exists($controller, '_beforeExecute')) {
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA\Dispatcher\Simple.php [77]
#4 FLEA_Dispatcher_Simple::_executeAction()
ARGS:
Array
(
)
SOURCE CODE:
67 |
|
68 |
/**
|
69 |
* 从请求中分析 Controller、Action 和 Package 名字,然后执行指定的 Action 方法
|
70 |
*
|
71 |
* @return mixed
|
72 |
*/
|
73 |
function dispatching()
|
74 |
{
|
75 |
$controllerName = $this->getControllerName();
|
76 |
$actionName = $this->getActionName();
|
77 |
return $this->_executeAction($controllerName, $actionName, $this->getControllerClass($controllerName));
|
78 |
}
|
79 |
|
80 |
/**
|
81 |
* 执行指定的 Action 方法
|
82 |
*
|
83 |
* @param string $controllerName
|
84 |
* @param string $actionName
|
85 |
* @param string $controllerClass
|
86 |
*
|
87 |
* @return mixed
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA.php [815]
#3 FLEA_Dispatcher_Simple::dispatching('default')
ARGS:
Array
(
[0] => default
)
SOURCE CODE:
805 |
require_once ($MVCPackageFilename);
|
806 |
}
|
807 |
FLEA::init ();
|
808 |
|
809 |
// 载入调度器并转发请求到控制器
|
810 |
$dispatcherClass = FLEA::getAppInf ( 'dispatcher' );
|
811 |
FLEA::loadClass ( $dispatcherClass );
|
812 |
|
813 |
$dispatcher = & new $dispatcherClass ( $_GET );
|
814 |
FLEA::register ( $dispatcher, $dispatcherClass );
|
815 |
$dispatcher->dispatching ();
|
816 |
}
|
817 |
|
818 |
/**
|
819 |
* 准备运行环境
|
820 |
*
|
821 |
* @param boolean $loadMVC
|
822 |
*/
|
823 |
function init($loadMVC = false) {
|
824 |
static $firstTime = true;
|
825 |
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\lib\FLEA\FLEA\Compatibility.php [263]
#2 FLEA::runMVC('default', 'content', 'controller_default')
ARGS:
Array
(
[0] => default
[1] => content
[2] => controller_default
)
SOURCE CODE:
253 |
FLEA::init();
|
254 |
}
|
255 |
|
256 |
/**
|
257 |
* FLEA 应用程序入口(已经过时,用 FLEA::runMVC() 代替)
|
258 |
*
|
259 |
* @deprecated
|
260 |
*/
|
261 |
function run()
|
262 |
{
|
263 |
FLEA::runMVC();
|
264 |
}
|
265 |
|
266 |
/**
|
267 |
* 初始化 Ajax,返回 FLEA_Ajax 对象实例(已经过时,用 FLEA::initAjax() 代替)
|
268 |
*
|
269 |
* @return FLEA_Ajax
|
270 |
* @deprecated
|
271 |
*/
|
272 |
function & init_ajax()
|
273 |
{
|
Filename: D:\www\web\tstcarbon.com_CTivom20xZ8T6LMXPqbo\wwwroot\index.php [29]
#1 run()
ARGS:
SOURCE CODE:
19 |
)
|
20 |
)
|
21 |
);
|
22 |
//FLEA::setAppInf('urlMode', URL_REWRITE);
|
23 |
FLEA::setAppInf('controllerAccessor', 'c');
|
24 |
FLEA::setAppInf('actionAccessor', 'a');
|
25 |
FLEA::setAppInf('logEnabled', false);//关闭日志记录
|
26 |
FLEA::loadAppInf(APP.'config/smarty_config.php');
|
27 |
FLEA::import(APP);
|
28 |
FLEA::init();
|
29 |
run();
|
30 |
?>
|
31 |
|