Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: little help with a crappy weblog< Next Oldest | Next Newest >
 Post Number: 1
Spydir Search for posts by this member.
proof that humans suck (www.netsyndrome.net)
Avatar



Group: Members
Posts: 1089
Joined: Apr. 2001
PostIcon Posted on: May 13 2001,21:04  Skip to the next post in this topic. Ignore posts   QUOTE

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/

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 2
Spydir Search for posts by this member.
proof that humans suck (www.netsyndrome.net)
Avatar



Group: Members
Posts: 1089
Joined: Apr. 2001
PostIcon Posted on: May 13 2001,22:20 Skip to the previous post in this topic.  Ignore posts   QUOTE

never mind on that... I kinna got it working...

------------------
Net Syndrome - http://www.netsyndrome.net/
Spydir Web - http://www.netsyndrome.net/spydirweb/

Offline
Top of Page Profile Contact Info WEB 
1 replies since May 13 2001,21:04 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply little help with a crappy weblog
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code