SUPER RP06
10-24-2006, 03:37 PM
Well, I'm new to PHP, and I need to create a blog from scratch. Just a simple one with a title, a timestamp and content, nothing fancy, something like this:
MY FIRST ENTRY
Posted on 2006-12-01 12:00:22 PM
This is my first entry............................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ........
Comments: 0
Well, I also needed a comment section too. Anyone good with PHP can you please respond?
bejayel
10-24-2006, 09:18 PM
i dont really understand what the question is...
but i am good with php
SUPER RP06
10-24-2006, 10:53 PM
Ok, then.....
Can you please help me find the way to create a blog from scratch? (tutorial, knowledge, anything!)
bejayel
10-25-2006, 03:43 PM
First you need to tell about what kind of resources you have.
Are you using php, perl, asp?
Do you have access to a database or will you be using flat files?
SUPER RP06
10-25-2006, 05:38 PM
I'm going to use PHP, maybe perl.
I'm going to use flat files.
Resources? Can you explain to me more about that?
bejayel
10-26-2006, 02:35 PM
Stupid, i had a nice big long post and then for some reason the site goes down, or the school is acting slow. Anywya i couldent post it.
I would rather not totally help, but point you in the right direction instead, since you are tryign to write it yourself from scratch.
First you will need a file for your posts, and a file for the comments. Make the reading portion first. Once you knwo what kind of data yo uwill have to read in, you can then move on to the writing portion.
You will need to take a look at the following functions:
fopen()
fgets()
feof()
explode()
list() //this one is not mandatory, but its nice when using the explode function
Study those functions a little bit and see if you can get the reading working right.
Douglas
10-27-2006, 04:34 PM
I strongly suggest you use a database system, such as MySQL. I attempted to make a blog for you just a few minutes ago, and found that the flat file approach got rather difficult, so I stopped. If I was using a database system I could do it with no problem.
bejayel
10-31-2006, 02:47 PM
the flat file approach is rather difficult. But if he can mimic a relational database as closely as possible, then he might not have many issues :). On the other hand. Keeping control of removing posts with the comments is a whole other story.
hdshngout
11-01-2006, 10:53 PM
if you want a so-so php blog tutorial, check out
http://codegrrl.com/!/tutorials/category/Build%20A%20Blog/
Fairly basic, but it works :P
SUPER RP06
11-15-2006, 10:58 PM
okay, hope that tutorial will help. I'll bookmark the link you posted, hdshngout.
Thanks!