DISQUS

Building Browsergames: Building Browsergames: Using Configuration Files (PHP)

  • Adam · 1 year ago
    I find PHP's parse_ini_file an efficient and very handy method to use for storing configuration as you can split settings up into multiple sections and such as you add more settings.

    ~ Adam
  • Luke · 1 year ago
    Hi Adam,

    Thanks for pointing out parse_ini_file - seeing as we've already done all of our configuration work for now, we probably won't be using it in this project - but it's on my list of things to use for the next one.
  • lollige · 8 months ago
    You have really written a wonderful tutorial, which contains just what I need! Thanks for linking every php code to the right page, this time it helped me easily figure the difference between require and require once, and require and include! Which I both did not know before (the differences)
    Thanks!
  • Sean · 8 months ago
    What happens when the engine fails and someone sees all the information on this page?
  • Luke · 8 months ago
    Hi Sean,
    What do you mean by 'fails'? As long as you've written an .htaccess rule to
    disallow users to view config.php, it should be virtually impossible for a
    user who doesn't have access to the web server to read your configuration
    file.