[thelist] .htaccess / PHP file creation / blog database design

Lachlan Cannon tiedefenderdelta6 at yahoo.com
Wed Feb 27 02:29:01 CST 2002


--- Burhan Khalid <burhankhalid at members.evolt.org> wrote:
> Lets take a crack at this :
>
> >Does anyone have some good links to articles on
> .htaccess?
> >Also, my quicker question is, in my meo account, how do
> I
> >redirect from the main directory to one called
> 'thoughts'?
>
> There are ways you can do this within any scripting
> language that sends
> headers (which doesn't)?
> You can also use a meta tag :

Yeah, I wanted to do this with Apache itself, since it
seems to be the 'cleanest' solution for this (if you get
what I mean), and also it's an excuse to learn some stuff
about Apache (since doing this whole weblog is really a
learning exercise). Thanks all the same!

> >Secondly, does anyone know how to create files with PHP?

> In PHP, here is a code snippet :
>
> $filePointer = fopen("somefile.dat", "w");

Thankyou thankyou thankyou! I was almost despairing of
finding a clean method of doing it. I thought I might need
to copy a file, rename it, and overwrite everything.

>
> >Lastly, I was trying to think of a database structure
> for
> >my own blog, and the only two fields I came up with were
> >datetime, as the key, and a text for the entry. This
> seems
> >a bit too simple to me... can anyone think of anything
> >which I will regret not having added at some point in
> the
> >future?
>
> I would also add a topic/category field, an author field
> (in case you want
> others to contribute to your blog). For now, that's all I
> can think of. You
> really can create a blog with a simple flat file (maybe
> its the
> hammer-as-a-fly-swatter situation?)

Yeah, well I'm going to have a database keeping the files
backed up, creating the flat files (in several different
formats), and modifying the flat files if an old entry is
deleted or edited. Another way of learning, plus it keeps
server burden down being able to serve the flat files.

I thought of a topic field too, although I'll be the only
author so no author. I hesitate to include something in the
databse that'll already be in the xml, but I'll already be
doing that for date as well. It could be all stored in the
xml, but it really needs to be in the db as well, for ease
of retrieval of the write file.

I think I still need to put some thought in before I launch
into it though, as indicated by the too many thoughts here.
Thankyou once again though.

Lach


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com



More information about the thelist mailing list