示例#1
0
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
if (!defined('IN_QISHI')) {
    die('Access Denied!');
}
global $_CFG;
include_once QISHI_ROOT_PATH . 'include/template_lite/class.template.php';
$cronstpl = new Template_Lite();
$cronstpl->cache_dir = QISHI_ROOT_PATH . 'temp/caches/' . $_CFG['template_dir'];
$cronstpl->compile_dir = QISHI_ROOT_PATH . 'temp/templates_c/' . $_CFG['template_dir'];
$cronstpl->template_dir = QISHI_ROOT_PATH . 'templates/' . $_CFG['template_dir'];
$cronstpl->cache = true;
$cronstpl->clear_all_cache();
//删除微信扫描缓存文件
deldir(QISHI_ROOT_PATH . "data/weixin/");
function deldir($dir)
{
    //删除目录下的文件:
    $dh = opendir($dir);
    while ($file = readdir($dh)) {
        if ($file != "." && $file != "..") {
            $fullpath = $dir . "/" . $file;
            if (!is_dir($fullpath)) {
                unlink($fullpath);
            } else {
                deldir($fullpath);
            }
        }