PHP configures its own configuration file
Aug 08, 2016 am 09:20 AMExample:
The first step is to create an order.php file in the application/config/ directory.
Add the following code:<?php $config['order'] = array( 'os_type' => array( "0"=>"Android 客户端", "1"=>"iOS 客户端", "3"=>"微信公共帐号", "4"=>"360", "5"=>"网页版", "6"=>"神马搜索", "10"=>"大众点评", "11"=>"美团" ), 'pay_type' => array( 1 => '微信', 2 => '支付宝', 3 => '微信公众', 4 => '免费', 5 => '只使用套餐卡' ) ); ?>
$this->config->load('order',TRUE); $order_config = $this->config->item('order', 'order'); $os_type = $order_config['os_type']; $pay_type_list = $order_config['pay_type'];
The above introduces how to configure PHP to configure its own configuration file, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What are the differences between Huawei GT3 Pro and GT4?

How to fix error 0xC00CE556 returned by the .NET parser

Fix: Snipping tool not working in Windows 11

What are the uses of the Type keyword in Go?

Solve Ubuntu mounting mobile hard disk error: unknown file system type exfat

How to Fix Can't Connect to App Store Error on iPhone

Sort array using Array.Sort function in C#

How to use ThinkPHP\Config for configuration management in php?
