Example #1
0
function wap_createFolder($path)
{
    if (!is_dir($path)) {
        wap_createFolder(dirname($path));
        @mkdir($path);
        @chmod($path, 0777);
        @fclose(@fopen($path . '/index.html', 'w'));
        @chmod($path . '/index.html', 0777);
    }
}
Example #2
0
        if ($rt['anonymous'] && $rt['authorid'] != $winduid && !$pwAnonyHide) {
            $rt['author'] = $db_anonymousname;
            $rt['authorid'] = 0;
        }
        $rt['postdate'] = get_date($rt['postdate']);
        $rt['id'] = $id;
        $rt['subject'] = wap_cv(str_replace(' ', '', $rt['subject']));
        $tids[] = $rt;
    }
    $db->free_result($query);
}
InitGP(array('t'), 'GP');
/* 查询帖子缓存 */
$_filedir = D_P . "data/wapcache/";
if (!is_dir($_filedir)) {
    wap_createFolder($_filedir);
}
if (empty($fid)) {
    $_filename = $_filedir . "wap_all_cache.php";
} else {
    $_filename = Pcv($_filedir . "wap_" . $fid . "_cache.php");
}
empty($type) && ($type = 'all');
if (count($tids) != 0 && count($tids) <= $per) {
    $tidsCatche = getTidsCache($type, 0, $per - count($tids));
} else {
    $tidsCatche = getTidsCache($type, $start, $per);
}
if (!empty($tidsCatche)) {
    $orderby = '';
    if ($type == 'digest') {