首页/技术开发/内容

是一个设计将LinuxFreak.org新闻标题放置到你的网站的PHP脚本程序。

技术开发2024-12-11 阅读()
[摘要](!(filesize(cache_file))) ) fpread = fopen(backend, 'r'); if(!fpread) else ...
(!(filesize($cache_file))) ) {

    $fpread = fopen($backend, 'r');
    if(!$fpread) {
    } else {

        $fpwrite = fopen($cache_file, 'w');
        if(!$fpwrite) {
        } else {

            while(! feof($fpread) ) {

                $buffer = ltrim(Chop(fgets($fpread, 256)));

                if (($buffer == "<item>") && ($items < $max_items)) {
                    $title = ltrim(Chop(fgets($fpread, 256)));
                    $link = ltrim(Chop(fgets($fpread, 256)));

                    $title = ereg_replace( "<title>", "", $title );
                    $title = ereg_replace( "</title>", "", $title );
                    $link = ereg_replace( "<link>", "", $link );
                    $link = ereg_replace( "</link>", "", $link );

                    fputs($fpwrite, "$link_prefix<A HREF="$link" TARGET="$target">$title</A>$link_postfix");

                    $items++;
                }
            }
        }
        fclose($fpread);
    }
    fclose($fpwrite);
}
if (file_exists($cache_file)) {
    include($cache_file);
}
?>  

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    


第1页  第2页  第3页  第4页  第5页 

……

相关阅读