How to include configuration data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rutger Claes

    How to include configuration data

    How do you import for example your database username, hostname etc. With a
    PHP named config.php file saying:
    $conf['db']['username'] = ...
    This is the way it is usualy done. But could you do it with XML (afraid of
    the performance hit) or with a ini file;
    My main concerns are: security, performance and ease of use.

    What have you tried and found usefull?

    Rutger
    --
    Rutger Claes rgc@rgc.tld
    Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
    Send some filthy mail.

  • Alvaro G Vicario

    #2
    Re: How to include configuration data

    *** Rutger Claes wrote/escribió (Fri, 19 Nov 2004 10:19:39 +0100):[color=blue]
    > This is the way it is usualy done. But could you do it with XML (afraid of
    > the performance hit) or with a ini file;
    > My main concerns are: security, performance and ease of use.[/color]

    If you use an *.ini file you already have a core function to handle it:

    Usage: array parse_ini_file ( string filename [, bool process_section s] )
    Purpose: Parse a configuration file
    Availability: PHP 4

    I don't know much about XML.

    --
    -- Álvaro G. Vicario - Burgos, Spain
    -- Thank you for not e-mailing me your questions
    --

    Comment

    Working...