php读取配置文件函数
来源:互联网 发布:语嫣 淘宝网总裁 编辑:程序博客网 时间:2024/05/16 17:35
配置文件格式:
## Main Configuration File## it can be default or whatever language. Only greek are supported# from non latin alphabet languages# These attribute only apply for ldap not for sql#general_prefered_lang: elgeneral_prefered_lang_name: Greek## Uncomment this if normal attributes (not the ;lang-xx ones) in ldap# are utf8 encoded.##general_decode_normal_attributes: yes#general_base_dir: /usr/local/dialup_admingeneral_radiusd_base_dir: /usr/local/general_domain: my.domain
读取配置文件的php函数
if (!isset($config)){$ARR=file("admin.conf");foreach($ARR as $val) {$val=chop($val);if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))continue;list($key,$v)=split(":[[:space:]]*",$val,2);if (preg_match("/%\{(.+)\}/",$v,$matches)){$val=$config[$matches[1]];$v=preg_replace("/%\{$matches[1]\}/",$val,$v);}$config["$key"]="$v";}echo "<pre>";var_dump($config);}
- php读取配置文件函数
- php读取配置文件信息
- C 读取配置文件函数
- php读取ini配置文件属性
- thinkphp 读取config.php配置文件
- php读取四种配置文件
- C 添加, 读取配置文件 函数
- 读取配置文件用到的函数
- PHP读取文件中的数组作为配置文件
- PHP读取文件中的数组作为配置文件
- php的几个配置文件函数
- php的几个配置文件函数
- php的几个配置文件函数
- PHP 的几个配置文件函数
- php的几个配置文件函数
- php的几个配置文件函数
- php的几个配置文件函数
- php的几个配置文件函数
- Android NDK 安装与配置
- windows下重新分配ip
- static_cast, dynamic_cast, const_cast探讨
- 基于tcpdump实例讲解TCP/IP协议
- 常用的android弹出对话框
- php读取配置文件函数
- SRM 597 DIV2 500
- iOS7 断了统计和追踪用户的后路
- 超级方便的linux命令手册
- 主机入侵防御系统(HIPS)分析
- 九度题目:简单计算器(1019)未AC
- Solaris服务管理
- Red Hat 通过ADSL拨号上网
- 十个数逆序输出--数组应用