if( file_exists('dokuwiki/data/pages/about/popularlinks.txt') ) echo "
熱門連結
" . parse_dokuwiki('dokuwiki/data/pages/about/popularlinks.txt'); $file = 'dokuwiki/data/changes.log'; $doc = file_get_contents($file); $rows = explode("\n", $doc); rsort($rows); echo "
最新文章
"; foreach($rows as $columns) { $col = explode("\t", $columns); $title = str_replace(":", "/", $col[2]); if( $lasttitle == $title || !file_exists("dokuwiki/data/pages/".$title.".txt") ) continue; else $lasttitle = $title; echo ""; if( ++$i == 30 ) break; } echo "
" . date("m/d", $col[0]) . "" . (strlen($title)>25?substr($title,0,22)."...":$title) . "" . ucfirst($col[3]) . "
";