Commit 4bb2190a by 王兴勇

去除helper

parent de1f282a
<?php
//在 shopnc.php 头部插入下面两行代码
require sprintf('%s%sconfig%2$scommon.php', dirname(__DIR__), DIRECTORY_SEPARATOR);
$__DB_CONFIG = require_db_config('local'); //选择数据库配置
//在 shopnc.php 尾部插入下面
//载入模拟登陆信息
faker_login('170');
//在 config.ini.php 文件头部写入以下代码
if ( ! function_exists('local')) {
$path = dirname(dirname(dirname(__DIR__)));
require sprintf('%s%sconfig%2$scommon.php', $path, DIRECTORY_SEPARATOR);
$__DB_CONFIG = require_db_config('local');
}
//并修改数据库
$config['db']['master']['dbhost'] = $__DB_CONFIG['dbhost'];
$config['db']['master']['dbport'] = isset($__DB_CONFIG['dbport']) ? $__DB_CONFIG['dbport'] : '3306';
$config['db']['master']['dbuser'] = $__DB_CONFIG['dbuser'];
$config['db']['master']['dbpwd'] = $__DB_CONFIG['dbpwd'];
$config['db']['master']['dbname'] = $__DB_CONFIG['dbname'];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment