标签:
config.php代码如下:
<?php return array( ‘db_user‘=>‘root‘, ‘db_pass‘=>‘root‘, ‘db_name‘=>‘test‘, ‘db_charset‘=>‘utf8‘, ); ?>
C_function.php代码如下:
<?php $username=C("db_user"); var_dump($username); function C($key) { $list=include ‘config.php‘; return empty($list[$key])?null:$list[$key]; } ?>
标签:
原文地址:http://www.cnblogs.com/lizhaoyao/p/4401994.html