Page 1 of 1

Mini CMS type build

Posted: Wed Sep 24, 2008 10:13 am
by wax0nightmare
Hi there, I was wondering if someone can help me about loading php files into other php files.

I basically have a blog type website built, I update all the content myself and I've decided to try and make every post a separate php file and load them in to one page, essientally it looks like this:

Code: Select all

 
<div id="left">
    <?php include '003.php'; ?>
    <?php include '002.php'; ?>
    <?php include '001.php'; ?>
</div>
 
All I want is the three most recent entries in the page at one time, there'll be a list on the right of the page with every blog post, where the user clicks the link to say entry 005, i want them to go to a page with just entry 005....just like what you see in something like Wordpress.

The problem is a typical post is just got a header tag and paragraph tags and nothing more so i can load them into the main index page. If the links along the right were just going to display the content of say 005.php they wouldn't get any style or anything else, is there a way i can load content of 005.php into a frame of a single page?

I realise some of you might say just get wordpress, but i just want to see if i can get a bare bones version of something like it?

Re: Mini CMS type build

Posted: Wed Sep 24, 2008 9:08 pm
by josh
I would probably use a database, but take a look at glob()