Exception: FLEA_Exception_CacheDisabled
Message: Cache function is disabled now. This is usually because internalCacheDir option is not defined or internalCacheDir directory is unwritable
Filename: E:\web\uutan\FLEA\FLEA\Db\TableDataGateway.php [1999]
#9 FLEA::writeCache('mysql://uutan:uutan^&*()zaq ...', array(16))
ARGS:
Array
(
[0] => mysql://uutan:uutan^&*()zaqxsw@localhost_/uutanmysql///pifa_suppliers
[1] => Array
(
[ID] => Array
(
[name] => id
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => R
[notNull] => 1
[primaryKey] => 1
[autoIncrement] => 1
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[ISCHK] => Array
(
[name] => ischk
[scale] =>
[type] => tinyint
[maxLength] => 4
[simpleType] => I
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] => 1
[defaultValue] => 0
[description] =>
)
[USERID] => Array
(
[name] => userid
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] => 1
[defaultValue] => 0
[description] =>
)
[CHKBMP] => Array
(
[name] => chkbmp
[scale] =>
[type] => varchar
[maxLength] => 200
[simpleType] => C
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[SHOPNAME] => Array
(
[name] => shopname
[scale] =>
[type] => varchar
[maxLength] => 200
[simpleType] => C
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[KEYPRO] => Array
(
[name] => keypro
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[SHOPMODEL] => Array
(
[name] => shopmodel
[scale] =>
[type] => varchar
[maxLength] => 50
[simpleType] => C
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[PWD] => Array
(
[name] => pwd
[scale] =>
[type] => varchar
[maxLength] => 50
[simpleType] => C
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[SHOPTYPE] => Array
(
[name] => shoptype
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[SITE] => Array
(
[name] => site
[scale] =>
[type] => varchar
[maxLength] => 200
[simpleType] => C
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[AREAPROVINCE] => Array
(
[name] => areaProvince
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[AREACITY] => Array
(
[name] => areaCity
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[AREACOUNTRY] => Array
(
[name] => areaCountry
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] =>
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[AUTOKF] => Array
(
[name] => autokf
[scale] =>
[type] => tinyint
[maxLength] => 4
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] => 1
[defaultValue] => 0
[description] =>
)
[CREATED] => Array
(
[name] => created
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
[UPDATED] => Array
(
[name] => updated
[scale] =>
[type] => int
[maxLength] => 11
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
[description] =>
)
)
)
SOURCE CODE:
| 1989 |
/**
|
| 1990 |
* 从数据库获得 meta
|
| 1991 |
*/
|
| 1992 |
$this->meta = $this->dbo->metaColumns($this->qtableName);
|
| 1993 |
if (!is_array($this->meta) || empty($this->meta)) {
|
| 1994 |
FLEA::loadClass('FLEA_Db_Exception_MetaColumnsFailed');
|
| 1995 |
return __THROW(new FLEA_Db_Exception_MetaColumnsFailed($this->qtableName));
|
| 1996 |
}
|
| 1997 |
|
| 1998 |
if ($cached) {
|
| 1999 |
return FLEA::writeCache($cacheId, $this->meta);
|
| 2000 |
} else {
|
| 2001 |
return true;
|
| 2002 |
}
|
| 2003 |
}
|
| 2004 |
|
| 2005 |
/**
|
| 2006 |
* 调用 create() 方法后立即引发 _beforeCreate 事件
|
| 2007 |
*
|
| 2008 |
* 如果要阻止 create() 创建记录,该方法应该返回 false,否则返回 true。
|
| 2009 |
*
|
Filename: E:\web\uutan\FLEA\FLEA\Db\TableDataGateway.php [333]
#8 FLEA_Db_TableDataGateway::_prepareMeta()
ARGS:
Array
(
)
SOURCE CODE:
| 323 |
$this->dbo =& $dbo;
|
| 324 |
|
| 325 |
if (empty($this->schema) && !empty($dbo->dsn['schema'])) {
|
| 326 |
$this->schema = $dbo->dsn['schema'];
|
| 327 |
}
|
| 328 |
if (empty($this->fullTableName)) {
|
| 329 |
$this->fullTableName = $dbo->dsn['prefix'] . $this->tableName;
|
| 330 |
}
|
| 331 |
$this->qtableName = $dbo->qtable($this->fullTableName, $this->schema);
|
| 332 |
|
| 333 |
if (!$this->_prepareMeta()) {
|
| 334 |
return false;
|
| 335 |
}
|
| 336 |
$this->fields = array_keys($this->meta);
|
| 337 |
|
| 338 |
if (is_array($this->validateRules)) {
|
| 339 |
foreach ($this->validateRules as $fieldName => $rules) {
|
| 340 |
$fieldName = strtoupper($fieldName);
|
| 341 |
if (!isset($this->meta[$fieldName])) { continue; }
|
| 342 |
foreach ((array)$rules as $ruleName => $rule) {
|
| 343 |
$this->meta[$fieldName][$ruleName] = $rule;
|
Filename: E:\web\uutan\FLEA\FLEA\Db\TableDataGateway.php [306]
#7 FLEA_Db_TableDataGateway::setDBO(FLEA_Db_Driver_Mysql)
ARGS:
Array
(
[0] => FLEA_Db_Driver_Mysql Object
(
[NEXT_ID_SQL] => UPDATE %s SET id = LAST_INSERT_ID(id + 1)
[CREATE_SEQ_SQL] => CREATE TABLE %s (id INT NOT NULL)
[INIT_SEQ_SQL] => INSERT INTO %s VALUES (%s)
[DROP_SEQ_SQL] => DROP TABLE %s
[META_COLUMNS_SQL] => SHOW FULL COLUMNS FROM %s
[PARAM_STYLE] => ?
[HAS_INSERT_ID] => 1
[HAS_AFFECTED_ROWS] => 1
[_mysqlVersion] => 5.0.22-community-nt
[TRUE_VALUE] => 1
[FALSE_VALUE] => 0
[NULL_VALUE] => NULL
[HAS_TRANSACTION] =>
[HAS_SAVEPOINT] =>
[RESULT_FIELD_NAME_LOWER] =>
[dsn] => Array
(
[driver] => mysql
[host] => localhost
[port] => 3306
[login] => uutan
[password] => uutan^&*()zaqxsw
[database] => uutanmysql
[options] =>
[prefix] =>
[schema] =>
[id] => mysql://uutan:uutan^&*()zaqxsw@localhost_/uutanmysql//
)
[conn] => Resource id #26
[log] => Array
(
)
[querycount] => 6
[lasterr] =>
[lasterrcode] =>
[_insertId] =>
[_transCount] => 0
[_hasFailedQuery] =>
[_savepointStack] => Array
(
)
[enableLog] =>
)
)
SOURCE CODE:
| 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 |
}
|
| 312 |
}
|
| 313 |
|
| 314 |
/**
|
| 315 |
* 设置数据库访问对象
|
| 316 |
*
|
Filename: E:\web\uutan\FLEA\FLEA.php [422]
#6 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
| 412 |
} else {
|
| 413 |
$classExists = class_exists($className);
|
| 414 |
}
|
| 415 |
if (!$classExists) {
|
| 416 |
if (!FLEA::loadClass($className)) {
|
| 417 |
$return = false;
|
| 418 |
return $return;
|
| 419 |
}
|
| 420 |
}
|
| 421 |
|
| 422 |
$instances[$className] =& new $className();
|
| 423 |
FLEA::register($instances[$className], $className);
|
| 424 |
return $instances[$className];
|
| 425 |
}
|
| 426 |
|
| 427 |
/**
|
| 428 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
| 429 |
*
|
| 430 |
* example:
|
| 431 |
* <code>
|
| 432 |
* $obj =& new MyClass();
|
Filename: E:\web\uutan\APP\Controller\Default.php [28]
#5 FLEA::getSingleton('Table_suppliers')
ARGS:
Array
(
[0] => Table_suppliers
)
SOURCE CODE:
| 18 |
var $_tbArticles;
|
| 19 |
var $_tbProducts;
|
| 20 |
var $_tbUser;
|
| 21 |
var $_tbCompliers;
|
| 22 |
|
| 23 |
function Controller_Default(){
|
| 24 |
parent::Controller_PiFa();
|
| 25 |
$this->_tbArticles =& FLEA::getSingleton('Table_Articles');
|
| 26 |
$this->_tbProducts =& FLEA::getSingleton('Table_Products');
|
| 27 |
$this->_tbUser =& FLEA::getSingleton('Model_User');
|
| 28 |
$this->_tbCompliers =& FLEA::getSingleton('Table_suppliers');
|
| 29 |
}
|
| 30 |
|
| 31 |
function actionindex(){
|
| 32 |
$dispatcher =& $this->_getDispatcher();
|
| 33 |
$user = $dispatcher->getUser();
|
| 34 |
$ui =& FLEA::initWebControls();
|
| 35 |
|
| 36 |
|
| 37 |
$userTb =& FLEA::getSingleton('Model_User');
|
| 38 |
$userRow = $userTb->userInfoDisp();
|
Filename: E:\web\uutan\FLEA\FLEA\Dispatcher\Simple.php [106]
#4 Controller_Default::Controller_Default('default')
ARGS:
Array
(
[0] => default
)
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: E:\web\uutan\FLEA\FLEA\Dispatcher\Auth.php [127]
#3 FLEA_Dispatcher_Simple::_executeAction('default', 'product', 'Controller_default')
ARGS:
Array
(
[0] => default
[1] => product
[2] => Controller_default
)
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: E:\web\uutan\FLEA\FLEA.php [816]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 806 |
require_once($MVCPackageFilename);
|
| 807 |
}
|
| 808 |
FLEA::init();
|
| 809 |
|
| 810 |
// 载入调度器并转发请求到控制器
|
| 811 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 812 |
FLEA::loadClass($dispatcherClass);
|
| 813 |
|
| 814 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 815 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 816 |
$dispatcher->dispatching();
|
| 817 |
}
|
| 818 |
|
| 819 |
/**
|
| 820 |
* 准备运行环境
|
| 821 |
*
|
| 822 |
* @param boolean $loadMVC
|
| 823 |
*/
|
| 824 |
function init($loadMVC = false)
|
| 825 |
{
|
| 826 |
static $firstTime = true;
|
Filename: E:\web\uutan\index.php [73]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 63 |
|
| 64 |
|
| 65 |
$appInf = array(
|
| 66 |
'dispatcher' => 'My_Dispatcher_Regexp'
|
| 67 |
);
|
| 68 |
FLEA::loadAppInf($appInf);
|
| 69 |
FLEA::setAppInf('routerConfig', APP_DIR . '/Config/router.php');
|
| 70 |
|
| 71 |
//加载所有的类
|
| 72 |
FLEA::import(APP_DIR);
|
| 73 |
FLEA::runMVC();
|
| 74 |
|
| 75 |
|
| 76 |
// define the authorization failed callback function
|
| 77 |
function onAuthFailedCallback($controller,$action)
|
| 78 |
{
|
| 79 |
redirect(url('member','Login',array('forward'=>base64_encode(url($controller,$action))))); // 这里是验证失败时,让用户去登录
|
| 80 |
}
|
| 81 |
|
| 82 |
|
| 83 |
// define the dispatcher failed callback function
|