Editer une configuration (Previous) (Next) Config::Config

View this page in Last updated: Sun, 28 Sep 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Conteneurs disponibles

Conteneurs disponibles --  Formats supportés

Conteneurs disponibles

Apache

Parses et enregistrer des fichiers de configuration Apache. Ce conteneur ne propose pas d'options.

GenericConf

Fichiers de configuration génériques. Les caractères égal (=), de début de commentaire et de nouvelle ligne dans l'analyseur peuvent être personnalisés pour correspondre votre format de configuration préféré.

IniCommented

Analyse les fichiers INI standards et maintient les commentaires within the file. Ce conteneur ne propose pas d'options.

IniFile

Analyse les fichiers INI standards en utilisant la fonction PHP parse_ini_file(). Ne lit pas les commentaires. Ce conteneur ne propose pas d'options.

PHPArray

Analyse les structures de tableau PHP. Peut lire depuis un fichier source PHP ou depuis un tableau en mémoire. Due to technical limitations, this container does not parse blank lines or comments when reading from a configuration file, therefore any information contained within PHP comments will be lost.

Avertissement

Vu que les fichiers de configuration contenant des tableaux PHP sont justes inclus en utilisant les méthodes standarts PHP, les commentaires de code et la structure seront perdus lors de la sauvegarde.

PHPConstants

Analyse un jeu de define() PHP depuis un fichier source PHP. Comments are maintained by this container, although blank lines will be lost. There are no options for this container.

XML

Analyse un fichier XML avec XML_Parser.

Editer une configuration (Previous) (Next) Config::Config

Download Documentation Last updated: Sun, 28 Sep 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: awgrover@msen.com
Here's some example config-file formats for PHP 5.1.2, Pear 1.6.2 Config 1.10.11.

Using the example code from this package's Introduction (../package.configuration.config.intro.php),
adding a blank-line and comment, and using defaults.

Apache
Described in http://httpd.apache.org/docs/2.0/configuring.html

<conf>
<DB>
type mysql
host localhost
user root

# this is a comment (after a blank line)
pass root
</DB>
</conf>

GenericConf
No sections. Apparently simple "key:value" lines.

type:mysql
host:localhost
user:root

#this is a comment (after a blank line)
pass:root

IniCommented
Apparently the Windows ini format
Useful reference: http://search.cpan.org/~wadg/Config-IniFiles-2.38/IniFiles.pm#FILE_FORMAT

[conf]
[DB]
type = mysql
host = localhost
user = root

;this is a comment (after a blank line)
pass = root

PHPArray
A bunch of array assignments. PHP code. Presumably does "include" or "eval". Arbitrary code probably possible.

<?php
    $conf
['conf']['DB']['type'] = 'mysql';
    
$conf['conf']['DB']['host'] = 'localhost';
    
$conf['conf']['DB']['user'] = 'root';

    
// this is a comment (after a blank line)
    
$conf['conf']['DB']['pass'] = 'root';
    
?>


PHPConstants
A bunch of "define()". Does not recognize/use sections. PHP code. Presumably does "include" or "eval". Arbitrary code probably possible.

<?php

    
/**
     *
     * AUTOMATICALLY GENERATED CODE -
                    DO NOT EDIT BY HAND
     *
    **/

    //
    // conf
    //

    //
    // DB
    //
    
define('type''mysql');
    
define('host''localhost');
    
define('user''root');

    
// this is a comment (after a blank line)
    
define('pass''root');

    
?>


XML
Straight-forward nested xml. Does not respect blank-lines.

<?xml version="1.0" encoding="ISO-8859-1"