You are here: Re: Alternatives to config/define « All PHP « IT news, forums, messages
Re: Alternatives to config/define

Posted by MS on 05/16/05 20:10

"NC" <nc@iname.com> wrote in message
news:1116261671.881939.236180@g47g2000cwa.googlegroups.com...
> MS wrote:
> >
> > I have built a website in PHP but on each page request it includes
> > a config file which defines all my global variables.
> >
> > define('WEB_NAME', 'The Website Name');
>
> You mean, global CONSTANTS?

Correct, That is what i meant !!

>
> > Although this works well, i am looking for a way for this config file
> to be
> > edited so that the values can be changed by the admin user (who may
> not
> > possess programming knowledge), but i dont want the variable name to
> be
> > changed.
>
> So you need to create an administrative interface. You can use
> get_defined_constants() function to obtain a list of defined constants
> and show it to the admin in a HTML form with explanations. Then, if
> changes are made to the form, you can generate a new config.php.

I have an admin interface for the rest of the CMS, I will look into
get_defined_constants() to see if it will do what i desire.

Thanks
Alex

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация