Miscellaneous
  Home arrow Miscellaneous arrow Configuration File Processing with PHP
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Configuration File Processing with PHP
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 6
    2003-12-13

    Table of Contents:
  • Configuration File Processing with PHP
  • A Simple Configuration File
  • A Grouped Configuration File
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Configuration File Processing with PHP


    (Page 1 of 4 )

    In this tutorial Timothy shows you how to work with configuration files with PHP.

    A lot of PHP scripts are written as quick and dirty solutions to specific problems. Occasionally a programmer may encase his or her set of functions within a class for future use or to share with others, but often times these scripts and classes will go about performing their routines without variation. For the script to change it's performance, one could write his or her script to rely upon a configuration file.

    A configuration file is an external file, usually in a plain text format though it can also be in a binary format. It is read by a program or script upon startup and the values within the file influences how the program behaves.

    In this tutorial I'll take a brief look at how to read in two common types of configuration files and parse them into arrays so that they can be used by the program.

    More Miscellaneous Articles
    More By bluephoenix


       ·  } else { $pieces = explode("=", $line); $pieces[0]...
       · Even better is to useexplode("=", $line, 2);Where it is about the third...
       · This is a nice article - but why go to all of that effort when PHP has a built-in...
     

    MISCELLANEOUS ARTICLES

    - Using PHP to Stream MP3 Files and Prevent Il...
    - 10 Must Have Firefox Improvements
    - All About OpenOffice 3.0
    - Shell Script Writing
    - Loops in the UNIX Shell
    - The Test in the UNIX Shell
    - Data Streams and the UNIX Shell
    - Control Mechanisms of the UNIX Shell
    - Variables Within the UNIX Shell
    - The Shell and UNIX
    - In Detail: UNIX File Systems
    - Rights Management in UNIX
    - UNIX File Systems
    - The Terminal in UNIX
    - Operating Systems and UNIX





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek