Posted by Johnny on 10/12/06 22:39
"Peter" <thiessenp@gmail.com> wrote in message
news:1160686700.321667.221990@b28g2000cwb.googlegroups.com...
> Greetings,
>
> I'm having trouble deciding on whether to go with a flat file or DB
> driven architecture for a wee personal website. I'd like to be able to
> update HTML files online and this is my only requirement.
>
> Flat Files:
> advantage: attach some PHP code at the top of each file that allows the
> file to be opened and edited
> disadvantage: the files would have to be writeable
>
> DB:
> advantage: more secure
> disadvantage: allot of overhead
>
> Would anyone have any advice?
Don't have any advice re flat vs db as I was uncomfortable with opening the
file permissions so i went with DB.
I'm not that comfortable with what's dangerous and what's not. I know just
enough to be dangerous ;-) As I understand it you need to allow write on the
directory as well as the file for 'other' but I'd have to test it to be
sure.
It just occurred to me a third way: use the PHP FTP functions to write the
file and that way you could keep the permissions tight. I do that now for
moving images from temp when they are uploaded for that very reason. Means
you need to have ftp user and pass stored somewhere on the server, so that
needs to be in a directory that can't be read from the web.
If all you want to do is update html online then that's fairly easy.
I don't see why you wouldn't just use ftp from your computer rather than go
to all the trouble of writing something to do it online.
But that's 'cos I can't exactly visualize what you do :-)
Most CMS I've dealt with allows you to put certain things in certain places
easily but if you go outside of the box then you are back to square one. So
it's a balance f ease of update versus what you can do.
>
> PS: I was originally planning to use a CMS but found that no CMS was
> customizable enough with little effort for a basic small website -
> strang eh :)
>
I've found the same thing whenever I wanted something small it was easiest
to write my own than deal with the complexity of the simplest I found but it
wasn't an exhaustive search.
A lot of people are using blogs like wordpress in place of a CMS but I find
that to be a complex app myself, a sledgehammer to drive in a thumbtack.
[Back to original message]
|