It's also a good idea to fopen() the file.
With some patience and regex you could make a config page the same way
you'd do using db, and the updates could be way easier than opening
the file on a ftp client as francky said.

...unless, of course, your host disallows file operations. In this
case the solution is storing on tables.

On Jun 27, 6:39 pm, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
> Oh, thanks guys, the bootstrap seems to work perfectly.  I could see
> how the database method would be helpful as you could easily do some
> quick scaffolding, and supply a client with an easy way to change
> website settings such as the site name, and little things such as
> 'posts per page' for instance.  But since the website name is the only
> thing I need stored for now, i'll use the constant method.  BTW Lecter
> if you updated it with the caching that would be great.  I may use it
> some day actually.  In fact, you could actually even make it into a
> plugin.
>
> thx
> Jonah
>
> On Jun 27, 12:25 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > Maybe because it's easier to plug a GUI to store data in database than
> > having an editor and an FTP (depends of the user of course) ?:-) ;)
>
> > On Jun 27, 4:42 pm, Martin Siniawski <[EMAIL PROTECTED]> wrote:
>
> > > Hey Lecter,
>
> > > Why would you do it that way instead of using constants? Your method
> > > involves only 1 query, so it isn't very expensive, but I don't see the
> > > benefit in doing it that way.
>
> > > Cheers,
> > > Martin
>
> > > On Jun 27, 4:28 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
>
> > > > This might be helpful to you:
>
> > > >http://dsi.vozibrale.com/articles/view/simple-db-based-configuration-...
>
> > > > I'll need to update the article though, I have a new version ready,
> > > > with caching.
>
> > > > On Jun 27, 9:20 am, "Turnquist, Jonah" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hey guys, do you think it would be better to use a php constant to
> > > > > store my website name?  Over using the config stuff?
>
> > > > > Because a constant would be way faster right?  I would use it on EVERY
> > > > > page.
>
> > > > > But where would should I define it?
>
> > > > > Thanks,
> > > > > Jonah

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to