Re: [PHP] script stoped working over christmas ?
In news: [EMAIL PROTECTED] - Jochem Maas wrote : Joker7 schreef: ... 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)){ full path to this file is not being used. $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } does the file exist? is it readable by php? is there anything in the file? have you looked at the output source to see what if anything was actually outputted? #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } No error message it's as if it working ,but not ,if I change the path or any thing else I get the apporiate error message. Chris Yes works with full path --- has been working for an age with out ,but then thats life.. Cheers Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script stoped working over christmas ?
Joker7 schreef: ... 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)){ full path to this file is not being used. $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } does the file exist? is it readable by php? is there anything in the file? have you looked at the output source to see what if anything was actually outputted? #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } No error message it's as if it working ,but not ,if I change the path or any thing else I get the apporiate error message. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script stoped working over christmas ?
Dude, put some error checking in there... On Sat, December 29, 2007 5:23 am, 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); if (!$fh) die(Failed to open $filename); $old_news = fread($fh, filesize($filename)); fclose($fh); } else{ die(file $filename does not exist!); #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] script stoped working over christmas ?
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; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script stoped working over christmas ?
2007. 12. 29, szombat keltezéssel 11.23-kor Joker7 ezt írta: Can anyone see why this has stopped working... what does it mean stopped working? what error message do you get? etc etc greets Zoltán Németh 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; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script stoped working over christmas ?
In news: [EMAIL PROTECTED] - Zoltán Németh wrote : 2007. 12. 29, szombat keltezéssel 11.23-kor Joker7 ezt írta: Can anyone see why this has stopped working... what does it mean stopped working? what error message do you get? etc etc greets Zoltán Németh 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; } } } No error message it's as if it working ,but not ,if I change the path or any thing else I get the apporiate error message. Chris -- Cheap As Chips Broadband http://yeah.kick-butt.co.uk Superb hosting domain name deals http://host.kick-butt.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php