Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Location
    Paris, FRANCE
    Posts
    132

    Post Unanswered: Config file read/write

    I'm wondering what is the best way to use config file for storing simple information like:
    Code:
    variable1=value1
    variable2=value2
    variable3=value3
    Last edited by gtk; 11-03-04 at 10:09.

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    168
    Initialize the commonly used valirables in the config file and call the file in the place you need ... like require("config.php");
    Is this what you want?

    Regards
    Rajesh
    Freelance and Technology Consultant
    -------------------
    Dreams are for ever
    -------------------

  3. #3
    Join Date
    Oct 2004
    Location
    Paris, FRANCE
    Posts
    132
    Sorry from your response, I think that I did not ask the right question, so let me try again.
    In fact, I need to write config file for each users of an interface.
    I'm wondering what format (XML for example but I don't think that I need XML for these simple configs) will I use and what tool to read/write them.
    For now I'm using this simple format:

    var1=value1
    var2=value2
    ...

    and I just do something like
    PHP Code:
    $tmp explode("="explode("\n"$config_file)[$i])[0];
    $
    $tmp explode("="explode("\n"$config_file)[$i])[1]; 
    Is there something simpler to do (something which manage inhibiters too)?

  4. #4
    Join Date
    Oct 2004
    Location
    Paris, FRANCE
    Posts
    132
    Please
    it's not so complicated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •