PHP expansion-config

Source: Internet
Author: User
PHP extension-config extension is used to load configuration options to the memory and optimize the configuration file loading process. Recommended scenarios: 1. you need to call the shared configuration in multiple projects and use config for management to avoid duplicate copy maintenance. 2. there are many configuration options. using config to load memory can avoid PHP expansion-config
Config extension is used to load configuration options to the memory and optimize the configuration file loading process.
Recommended scenarios:1. shared configurations need to be called in multiple projects and managed using config to avoid duplicate copy maintenance. 2. there are many configuration options. using config and loading memory can avoid PHP loading the configuration file for explanation and execution each time.
Project address: http://git.oschina.net/365690485/php_extension_config


Note: Currently, only PHP5.3.3 is tested and compiled in other versions.
Let's take a look at a simple config. ini:
; The parameter value length cannot exceed 255 [define]; ==================================== service center domain name ========== ===============; message forwarding server node MSG_SERVER_0 = http://msg0.20..cn/?user_service = == http://msg.service.#.cn/?config=max_upload_size = 2048login_redirect_url = http://login.service.10000.cn/

Syntax format:";" Indicates the option under [define], which is defined as a macro. it is equivalent to define (key, value). the client call method is echo MSG_SERVER_0 [config, indicates a linked list defined as key-value. The client call method is echo config ('max _ upload_size ')
Recommended scenarios:1. shared configurations need to be called in multiple projects and managed using config to avoid duplicate copy maintenance. 2. there are many configuration options. using config and loading memory can avoid PHP loading the configuration file for explanation and execution each time.


1. installation procedure (centos)1. install the PHP development environment
yum -y install php-devel

2. decompress the extension package
tar zxf config.tar.gz

3. go to the directory and compile and install
cd configphpize./configure --with-php-config=/usr/bin/php-configmake && make install

4. add a new line at the end of php. ini configuration.
Extension = config. so [config] config. path = absolute path of the configuration file

Download extension: config.tar.gz

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.