本文整理汇总了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');
}
}