本文整理匯總了PHP中tlocal::clearcache方法的典型用法代碼示例。如果您正苦於以下問題:PHP tlocal::clearcache方法的具體用法?PHP tlocal::clearcache怎麽用?PHP tlocal::clearcache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tlocal
的用法示例。
在下文中一共展示了tlocal::clearcache方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
if (file_exists(litepublisher::$paths->data . 'storage.php') && filesize(litepublisher::$paths->data . 'storage.php')) {
die('Storage not loaded');
}
//if (!litepublisher::$options->installed) require_once(litepublisher::$paths->lib .'install' . DIRECTORY_SEPARATOR . 'install.php');
require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php';
}
litepublisher::$classes = tclasses::i();
litepublisher::$options = toptions::i();
litepublisher::$db = new tdatabase();
litepublisher::$site = tsite::i();
litepublisher::$urlmap = turlmap::i();
/*
litepublisher::$db->query('SET sort_buffer_size = ' . 1024*1024*32);
litepublisher::$db->query('SET read_rnd_buffer_size = ' . 1024*1024*32);
*/
tlocal::clearcache();
ttheme::clearcache();
include dirname(__FILE__) . '/zdebug.php';
if (!defined('litepublisher_mode')) {
litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']);
}
} catch (Exception $e) {
// echo $e->GetMessage();
litepublisher::$options->handexception($e);
}
litepublisher::$options->savemodified();
litepublisher::$options->showerrors();
/*
echo "<pre>\n";
$man = tdbmanager::i();
echo $man->performance();
示例2: update
public function update()
{
$log = $this->log;
false;
if ($log) {
tfiler::log("begin update", 'update');
}
tlocal::clearcache();
$this->versions = self::getversions();
$nextver = $this->nextversion;
if ($log) {
tfiler::log("update started from litepublisher::{$options->version} to {$this->version}", 'update');
}
$v = litepublisher::$options->version + 0.01;
while (version_compare($v, $nextver) <= 0) {
$ver = (string) $v;
if (strlen($ver) == 3) {
$ver .= '0';
}
if (strlen($ver) == 1) {
$ver .= '.00';
}
if ($log) {
tfiler::log("{$v} selected to update", 'update');
}
$this->run($v);
litepublisher::$options->version = $ver;
litepublisher::$options->savemodified();
$v = $v + 0.01;
}
ttheme::clearcache();
tlocal::clearcache();
tsidebars::fix();
if ($log) {
tfiler::log("update finished", 'update');
}
}