Exception: FLEA_Exception_CacheDisabled
Message: 缓存功能被禁用,通常这是因为没有指定应用程序设置 internalCacheDir 选项,或者 internalCacheDir 设置指定的目录不可写入文件.
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA/Db/TableDataGateway.php
#10
FLEA::writeCache('mysql://nanjingzhongta:vWkY ...', array(1))
FILE: TableDataGateway.php
LINE: 1637
ARGS: :
Array
(
[0] => mysql://nanjingzhongta:vWkYDL55u2@sql.2195.vh.cnolnic.com_/nanjingzhongta/
[1] => Array
(
[NEWS] => Array
(
[NEWSID] => Array
(
[name] => newsid
[scale] =>
[type] => int
[maxLength] => 10
[simpleType] => R
[notNull] => 1
[primaryKey] => 1
[autoIncrement] => 1
[binary] =>
[unsigned] => 1
[hasDefault] =>
)
[TITLE] => Array
(
[name] => title
[scale] =>
[type] => text
[maxLength] => -1
[simpleType] => X
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
)
[UPTIME] => Array
(
[name] => uptime
[scale] =>
[type] => datetime
[maxLength] => -1
[simpleType] => T
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
)
[CONTENT] => Array
(
[name] => content
[scale] =>
[type] => text
[maxLength] => -1
[simpleType] => X
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] =>
[hasDefault] =>
)
[USERID] => Array
(
[name] => userid
[scale] =>
[type] => int
[maxLength] => 10
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] => 1
[hasDefault] =>
)
[SORTID] => Array
(
[name] => sortid
[scale] =>
[type] => int
[maxLength] => 10
[simpleType] => I
[notNull] => 1
[primaryKey] =>
[autoIncrement] =>
[binary] =>
[unsigned] => 1
[hasDefault] =>
)
)
)
)
SOURCE CODE:
| 1627 |
}
|
| 1628 |
|
| 1629 |
$this->meta = $this->dbo->metaColumns($this->fullTableName);
|
| 1630 |
if ($this->meta == false) {
|
| 1631 |
FLEA::loadClass('FLEA_Db_Exception_MetaColumnsFailed');
|
| 1632 |
__THROW(new FLEA_Db_Exception_MetaColumnsFailed($this->tableName));
|
| 1633 |
return false;
|
| 1634 |
}
|
| 1635 |
if ($cached) {
|
| 1636 |
$allMeta[$metaID] = $this->meta;
|
| 1637 |
return FLEA::writeCache($cacheId, $allMeta);
|
| 1638 |
} else {
|
| 1639 |
return true;
|
| 1640 |
}
|
| 1641 |
}
|
| 1642 |
|
| 1643 |
/**
|
| 1644 |
* 调用 create() 方法后立即引发 _beforeCreate 事件
|
| 1645 |
*
|
| 1646 |
* 如果要阻止 create() 创建记录,该方法应该返回 false,否则返回 true。
|
| 1647 |
*
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA/Db/TableDataGateway.php
#9
FLEA_Db_TableDataGateway::_prepareMeta()
FILE: TableDataGateway.php
LINE: 312
ARGS: :
Array
(
)
SOURCE CODE:
| 302 |
*
|
| 303 |
* @return boolean
|
| 304 |
*/
|
| 305 |
function setDBO(& $dbo)
|
| 306 |
{
|
| 307 |
$this->dbo =& $dbo;
|
| 308 |
|
| 309 |
$this->fullTableName = $dbo->dsn['dbTablePrefix'] . $this->tableName;
|
| 310 |
$this->qtableName = $dbo->qtable($this->fullTableName);
|
| 311 |
|
| 312 |
if (!$this->_prepareMeta()) {
|
| 313 |
return false;
|
| 314 |
}
|
| 315 |
|
| 316 |
if (is_array($this->validateRules)) {
|
| 317 |
foreach ($this->validateRules as $fieldName => $rules) {
|
| 318 |
$fieldName = strtoupper($fieldName);
|
| 319 |
if (!isset($this->meta[$fieldName])) { continue; }
|
| 320 |
foreach ((array)$rules as $ruleName => $rule) {
|
| 321 |
$this->meta[$fieldName][$ruleName] = $rule;
|
| 322 |
}
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA/Db/TableDataGateway.php
#8
FLEA_Db_TableDataGateway::setDBO(FLEA_Db_Driver_Mysql)
FILE: TableDataGateway.php
LINE: 289
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
[TRUE_VALUE] => 1
[FALSE_VALUE] => 0
[NULL_VALUE] => NULL
[META_COLUMNS_SQL] => SHOW COLUMNS FROM %s
[dsn] => Array
(
[driver] => mysql
[host] => sql.2195.vh.cnolnic.com
[port] => 3306
[login] => nanjingzhongta
[password] => vWkYDL55u2
[database] => nanjingzhongta
[options] =>
[dbTablePrefix] =>
[id] => mysql://nanjingzhongta:vWkYDL55u2@sql.2195.vh.cnolnic.com_/nanjingzhongta/
)
[conn] => Resource id #17
[log] => Array
(
[0] => SELECT VERSION()
[1] => SET NAMES 'utf8'
[2] => SHOW COLUMNS FROM `news`
)
[enableLog] => 1
[lasterr] =>
[lasterrcode] =>
[_insertId] =>
[_transCount] => 0
[_transCommit] => 1
)
)
SOURCE CODE:
| 279 |
// 初始化数据访问对象
|
| 280 |
if (!isset($params['dbo'])) {
|
| 281 |
if (isset($params['dbDSN'])) {
|
| 282 |
$dbo =& FLEA::getDBO($params['dbDSN']);
|
| 283 |
} else {
|
| 284 |
$dbo =& FLEA::getDBO(FLEA::getAppInf('dbDSN'));
|
| 285 |
}
|
| 286 |
} else {
|
| 287 |
$dbo =& $params['dbo'];
|
| 288 |
}
|
| 289 |
$this->setDBO($dbo);
|
| 290 |
|
| 291 |
// 当 skipCreateLinks 不为 true 时,建立关联
|
| 292 |
if (!isset($params['skipCreateLinks']) || $params['skipCreateLinks'] == false)
|
| 293 |
{
|
| 294 |
$this->relink();
|
| 295 |
}
|
| 296 |
}
|
| 297 |
|
| 298 |
/**
|
| 299 |
* 设置数据库访问对象
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA.php
#7
FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
FILE: FLEA.php
LINE: 342
ARGS: :
Array
(
)
SOURCE CODE:
| 332 |
} else {
|
| 333 |
$classExists = class_exists($className);
|
| 334 |
}
|
| 335 |
if (!$classExists) {
|
| 336 |
if (!FLEA::loadClass($className)) {
|
| 337 |
$return = false;
|
| 338 |
return $return;
|
| 339 |
}
|
| 340 |
}
|
| 341 |
|
| 342 |
$instances[$className] =& new $className();
|
| 343 |
FLEA::register($instances[$className], $className);
|
| 344 |
return $instances[$className];
|
| 345 |
}
|
| 346 |
|
| 347 |
/**
|
| 348 |
* 将一个对象实例注册到对象实例容器
|
| 349 |
*
|
| 350 |
* @param object $obj
|
| 351 |
* @param string $name
|
| 352 |
*
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/APP/Controller/News.php
#6
FLEA::getSingleton('Model_News')
FILE: News.php
LINE: 11
ARGS: :
Array
(
[0] => Model_News
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
class Controller_News
|
| 3 |
{
|
| 4 |
var $_output="";
|
| 5 |
var $_modelNews;
|
| 6 |
function Controller_News()
|
| 7 |
{
|
| 8 |
/**
|
| 9 |
* FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
|
| 10 |
*/
|
| 11 |
$this->_modelNews =& FLEA::getSingleton('Model_News');
|
| 12 |
}
|
| 13 |
|
| 14 |
public function actionList() {
|
| 15 |
//echo "新闻控制器 列表事件";
|
| 16 |
$conditions = array(
|
| 17 |
'sort.sortbind' => '2', //新闻
|
| 18 |
'sort.sorttype' => '0', //公开新闻
|
| 19 |
);
|
| 20 |
$page = (isset($_GET['page']))?(int)$_GET['page']:0;
|
| 21 |
$pageSize = 5;
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/APP/Controller/Default.php
#5
Controller_News::Controller_News()
FILE: Default.php
LINE: 6
ARGS: :
Array
(
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
class Controller_Default
|
| 3 |
{
|
| 4 |
|
| 5 |
function actionIndex() {
|
| 6 |
$newsMod=new Controller_News();
|
| 7 |
$newsMod->actionFrontList();
|
| 8 |
$DownloadsMod=new Controller_Downloads();
|
| 9 |
$DownloadsMod->actionShowPicIn();
|
| 10 |
if(!isset($_SESSION['count']))
|
| 11 |
{
|
| 12 |
$CounterMod=new Controller_Counter();
|
| 13 |
$CounterMod->actionIndex();
|
| 14 |
$_SESSION['count']=$CounterMod->count;
|
| 15 |
}
|
| 16 |
include("APP/View/main.php");
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA/Dispatcher/Simple.php
#4
Controller_Default::actionIndex()
FILE: Simple.php
LINE: 127
ARGS: :
Array
(
)
SOURCE CODE:
| 117 |
}
|
| 118 |
if (method_exists($controller, '__setDispatcher')) {
|
| 119 |
$controller->__setDispatcher($this);
|
| 120 |
}
|
| 121 |
|
| 122 |
// 调用 _beforeExecute() 方法
|
| 123 |
if (method_exists($controller, '_beforeExecute')) {
|
| 124 |
$controller->_beforeExecute($actionMethod);
|
| 125 |
}
|
| 126 |
// 执行 action 方法
|
| 127 |
$ret = $controller->{$actionMethod}();
|
| 128 |
// 调用 _afterExecute() 方法
|
| 129 |
if (method_exists($controller, '_afterExecute')) {
|
| 130 |
$controller->_afterExecute($actionMethod);
|
| 131 |
}
|
| 132 |
return $ret;
|
| 133 |
} while (false);
|
| 134 |
|
| 135 |
if ($callback) {
|
| 136 |
// 检查是否调用应用程序设置的错误处理程序
|
| 137 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA/Dispatcher/Auth.php
#3
FLEA_Dispatcher_Simple::_executeAction('Default', 'index', 'Controller_Default')
FILE: Auth.php
LINE: 127
ARGS: :
Array
(
[0] => Default
[1] => index
[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 ($rawACT == null || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
|
| 137 |
if ($callback) {
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/FLEA/FLEA.php
#2
FLEA_Dispatcher_Auth::dispatching()
FILE: FLEA.php
LINE: 648
ARGS: :
Array
(
)
SOURCE CODE:
| 638 |
require_once($MVCPackageFilename);
|
| 639 |
}
|
| 640 |
FLEA::init();
|
| 641 |
|
| 642 |
// 载入调度器并转发请求到控制器
|
| 643 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 644 |
FLEA::loadClass($dispatcherClass);
|
| 645 |
|
| 646 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 647 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 648 |
$dispatcher->dispatching();
|
| 649 |
}
|
| 650 |
|
| 651 |
/**
|
| 652 |
* 准备运行环境
|
| 653 |
*
|
| 654 |
* @param boolean $loadMVC
|
| 655 |
*/
|
| 656 |
function init($loadMVC = false)
|
| 657 |
{
|
| 658 |
static $firstTime = true;
|
Filename: /var/www/vhosts/nanjingzhongtai.com/httpdocs/index.php
#1
FLEA::runMVC()
FILE: index.php
LINE: 41
ARGS: :
Array
(
)
SOURCE CODE:
| 31 |
/**
|
| 32 |
* 指定数据库连接设置,TableDataGateway 会自动取出 dbDSN 设置来连接数据库。
|
| 33 |
* FLEA::loadAppInf() 会用开发者指定的应用程序设置覆盖 FleaPHP 提供的默认设置。
|
| 34 |
* 开发者可以使用 FLEA::getAppInf() 取出任意应用程序设置。
|
| 35 |
*/
|
| 36 |
FLEA::loadAppInf($configFilename);
|
| 37 |
|
| 38 |
/**
|
| 39 |
* FLEA::runMVC() 根据 URL 地址实例化指定的 Controller 类,调用指定的 Action 方法
|
| 40 |
*/
|
| 41 |
FLEA::runMVC();
|
| 42 |
|
| 43 |
?> |