I've been tinkering with this dinky little weblog I found somewhere on the 'net, and wondering if I can get some help (php related, so all you VBScript dozer's get outta here!)... I'd like to note I'm currently no programmer, but know enough so I can edit things a little here and there, and I have tried a couple things, that have all failed.My problem's here:
code:
<?require('config.php');
$filename = "article_summary.html";
#- open article summaries
if(file_exists($filename)){
$fh = fopen($filename, "r");
$old_news = fread($fh, filesize($filename));
fclose($fh);
}
#- get first five article
$articles = explode("<!--ARTICLE-->", $old_news);
$i=0;
foreach ( $articles as $article ){
if(count($articles)>$i){
if($max_latest >= $i++){
print $article;
}
}
}
?>
The doc's say i need to use SSI's to get that in there, but I'm trying to get it in with PHP so the code will go along with the rest of my design.
So, either a) how do I get the file above to output to a variable so I can just echo it, or b) get a SSI into my PHP with out renaming the file from *whatever*.php to *whatever*.shtml, because it's one or the other (stupid webhost...)
Probably is a extreme PHP newbie question, but that's what I am with it.
------------------
Net Syndrome - http://www.netsyndrome.net/
Spydir Web - http://www.netsyndrome.net/spydirweb/