Re: script stoped working over christmas ? (whoops)

From: Date: Sat, 29 Dec 2007 11:30:58 +0000
Subject: Re: script stoped working over christmas ? (whoops)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-266349@lists.php.net to get a copy of this message
Whoops sorry the include should be .... include("/home/sever2/public_html/teaup/article/latest.php") Chris In news: E7.44.31404.D9E26774@pb1.pair.com - "Joker7" wrote : >> Can anyone see why this has stopped working... >> latest.php is used with <? >> include("/home/sever2/public_html/teaup/article/article_summary.php") >> ?> to show the latest news articles. >> >> Cheers >> Chris >> >> config.php >> <?php >> $max_summary = 6; >> $max_latest = 7; >> $summary_template = "t_summary.tp"; >> $article_template = "t_article.tp"; >> $password = "password"; >>> >> >> latest.php >> <?php >> >> require('config.php'); >> >> $filename = "article_summary.php"; >> >> #- open article summaries >> if(file_exists($filename)){ >> $fh = fopen($filename, "r"); >> $old_news = fread($fh, filesize($filename)); >> fclose($fh); >> } >> >> #- get article >> $articles = explode("<!--ARTICLE-->", $old_news); >> $i=0; >> foreach ( $articles as $article ){ >> if(count($articles)>$i){ >> if($max_latest >= $i++){ >> print $article; >> } >> } >> } -- Cheap As Chips Broadband http://yeah.kick-butt.co.uk Superb hosting & domain name deals http://host.kick-butt.co.uk

« previous php.general (#266349) next »