'100', 'msg' => '您的数据库访问用户名或是密码错误'); } } else { $sql = "SELECT `SCHEMA_NAME` FROM `information_schema`.`SCHEMATA`"; $result = mysqli_query($link, $sql); while ($rs = mysqli_fetch_array($result)) { $databases[] = $rs[0]; } $result = array('code' => '200', 'data' => implode(',', $databases)); } echo json_encode($result); die; } /** * 安装第一步,许可协议 */ if ($action == 'license') { if ($ispost) { setcookie('action', 'env'); header('location: ?refresh'); exit; } tpl_install_license(); } /** *检测安装环境 */ if ($action == 'env') { if ($ispost) { setcookie('action', $_POST['do'] == 'continue' ? 'db' : 'license'); header('location: ?refresh'); exit; } $ret = array(); $ret['server']['os']['value'] = php_uname(); if (PHP_SHLIB_SUFFIX == 'dll') { $ret['server']['os']['remark'] = '建议使用 Linux 系统以提升程序性能'; $ret['server']['os']['class'] = 'warning'; } $ret['server']['sapi']['value'] = $_SERVER['SERVER_SOFTWARE']; if (PHP_SAPI == 'isapi') { $ret['server']['sapi']['remark'] = '建议使用 Apache 或 Nginx 以提升程序性能'; $ret['server']['sapi']['class'] = 'warning'; } $ret['server']['php']['value'] = PHP_VERSION; $ret['server']['dir']['value'] = PATH_ROOT; if (function_exists('disk_free_space')) { $ret['server']['disk']['value'] = floor(disk_free_space(PATH_ROOT) / (1024 * 1024)) . 'M'; } else { $ret['server']['disk']['value'] = 'unknow'; } $ret['server']['upload']['value'] = @ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'unknow'; $ret['php']['version']['value'] = PHP_VERSION; $ret['php']['version']['class'] = 'success'; if (version_compare(PHP_VERSION, '7.1.0') == -1) { $ret['php']['version']['class'] = 'danger'; $ret['php']['version']['failed'] = true; $ret['php']['version']['remark'] = 'PHP版本必须为 7.1.0 以上.'; } $ret['php']['mysql']['ok'] = function_exists('mysqli_connect'); if ($ret['php']['mysql']['ok']) { $ret['php']['mysql']['value'] = ''; } else { $ret['php']['pdo']['failed'] = true; $ret['php']['mysql']['value'] = ''; } $ret['php']['pdo']['ok'] = extension_loaded('pdo') && extension_loaded('pdo_mysql'); if ($ret['php']['pdo']['ok']) { $ret['php']['pdo']['value'] = ''; $ret['php']['pdo']['class'] = 'success'; if (!$ret['php']['mysql']['ok']) { $ret['php']['pdo']['remark'] = '您的PHP环境不支持 mysqli_connect,请开启此扩展. '; } } else { $ret['php']['pdo']['failed'] = true; if ($ret['php']['mysql']['ok']) { $ret['php']['pdo']['value'] = ''; $ret['php']['pdo']['class'] = 'warning'; $ret['php']['pdo']['remark'] = '您的PHP环境不支持PDO, 请开启此扩展. '; } else { $ret['php']['pdo']['value'] = ''; $ret['php']['pdo']['class'] = 'danger'; $ret['php']['pdo']['remark'] = '您的PHP环境不支持PDO, 也不支持 mysqli_connect, 系统无法正常运行. '; } } $ret['php']['fopen']['ok'] = @ini_get('allow_url_fopen') && function_exists('fsockopen'); if ($ret['php']['fopen']['ok']) { $ret['php']['fopen']['value'] = ''; } else { $ret['php']['fopen']['value'] = ''; } $ret['php']['curl']['ok'] = extension_loaded('curl') && function_exists('curl_init'); if ($ret['php']['curl']['ok']) { $ret['php']['curl']['value'] = ''; $ret['php']['curl']['class'] = 'success'; if (!$ret['php']['fopen']['ok']) { $ret['php']['curl']['remark'] = '您的PHP环境虽然不支持 allow_url_fopen, 但已经支持了cURL, 这样系统是可以正常高效运行的, 不需要额外处理. '; } } else { if ($ret['php']['fopen']['ok']) { $ret['php']['curl']['value'] = ''; $ret['php']['curl']['class'] = 'warning'; $ret['php']['curl']['remark'] = '您的PHP环境不支持cURL, 但支持 allow_url_fopen, 这样系统虽然可以运行, 但还是建议你开启cURL以提升程序性能和系统稳定性. '; } else { $ret['php']['curl']['value'] = ''; $ret['php']['curl']['class'] = 'danger'; $ret['php']['curl']['remark'] = '您的PHP环境不支持cURL, 也不支持 allow_url_fopen, 系统无法正常运行. '; $ret['php']['curl']['failed'] = true; } } $ret['php']['gd']['ok'] = extension_loaded('gd'); if ($ret['php']['gd']['ok']) { $ret['php']['gd']['value'] = ''; $ret['php']['gd']['class'] = 'success'; } else { $ret['php']['gd']['value'] = ''; $ret['php']['gd']['class'] = 'danger'; $ret['php']['gd']['failed'] = true; $ret['php']['gd']['remark'] = '没有启用GD, 将无法正常上传和压缩图片, 系统无法正常运行. '; } $ret['php']['openssl']['ok'] = extension_loaded('openssl'); if ($ret['php']['openssl']['ok']) { $ret['php']['openssl']['value'] = ''; $ret['php']['openssl']['class'] = 'success'; } else { $ret['php']['openssl']['value'] = ''; $ret['php']['openssl']['class'] = 'danger'; $ret['php']['openssl']['failed'] = true; $ret['php']['openssl']['remark'] = '没有启用openssl扩展. '; } $ret['php']['bcmath']['ok'] = extension_loaded('bcmath'); if ($ret['php']['bcmath']['ok']) { $ret['php']['bcmath']['value'] = ''; $ret['php']['bcmath']['class'] = 'success'; } else { $ret['php']['bcmath']['value'] = ''; $ret['php']['bcmath']['class'] = 'danger'; $ret['php']['bcmath']['failed'] = true; $ret['php']['bcmath']['remark'] = '没有启用bcmath扩展. '; } $ret['php']['dom']['ok'] = class_exists('DOMDocument'); if ($ret['php']['dom']['ok']) { $ret['php']['dom']['value'] = ''; $ret['php']['dom']['class'] = 'success'; } else { $ret['php']['dom']['value'] = ''; $ret['php']['dom']['class'] = 'danger'; $ret['php']['dom']['failed'] = true; $ret['php']['dom']['remark'] = '没有启用DOMDocument, 将无法正常安装使用模块, 系统无法正常运行. '; } $ret['php']['session']['ok'] = ini_get('session.auto_start'); if ($ret['php']['session']['ok'] == 0 || strtolower($ret['php']['session']['ok']) == 'off') { $ret['php']['session']['value'] = ''; $ret['php']['session']['class'] = 'success'; } else { $ret['php']['session']['value'] = ''; $ret['php']['session']['class'] = 'danger'; $ret['php']['session']['failed'] = true; $ret['php']['session']['remark'] = '系统session.auto_start开启, 将无法正常注册会员, 系统无法正常运行. '; } $ret['php']['asp_tags']['ok'] = ini_get('asp_tags'); if (empty($ret['php']['asp_tags']['ok']) || strtolower($ret['php']['asp_tags']['ok']) == 'off') { $ret['php']['asp_tags']['value'] = ''; $ret['php']['asp_tags']['class'] = 'success'; } else { $ret['php']['asp_tags']['value'] = ''; $ret['php']['asp_tags']['class'] = 'danger'; $ret['php']['asp_tags']['failed'] = true; $ret['php']['asp_tags']['remark'] = '请禁用可以使用ASP 风格的标志,配置php.ini中asp_tags = Off'; } $ret['write']['root']['ok'] = local_writeable(PATH_ROOT . '/uploads'); if ($ret['write']['root']['ok']) { $ret['write']['root']['value'] = ''; $ret['write']['root']['class'] = 'success'; } else { $ret['write']['root']['value'] = ''; $ret['write']['root']['class'] = 'danger'; $ret['write']['root']['failed'] = true; $ret['write']['root']['remark'] = 'public/uploads无法写入, 将无法使用自动更新功能, 系统无法正常运行. '; } $ret['write']['data']['ok'] = local_writeable(PATH_ROOT . '/../runtime'); if ($ret['write']['data']['ok']) { $ret['write']['data']['value'] = ''; $ret['write']['data']['class'] = 'success'; } else { $ret['write']['data']['value'] = ''; $ret['write']['data']['class'] = 'danger'; $ret['write']['data']['failed'] = true; $ret['write']['data']['remark'] = 'runtime目录无法写入, 将无法写入配置文件, 系统无法正常安装. '; } $ret['write']['install']['ok'] = local_writeable(PATH_ROOT . '/install'); if ($ret['write']['install']['ok']) { $ret['write']['install']['value'] = ''; $ret['write']['install']['class'] = 'success'; } else { $ret['write']['install']['value'] = ''; $ret['write']['install']['class'] = 'danger'; $ret['write']['install']['failed'] = true; $ret['write']['install']['remark'] = 'public/install目录无法写入, 将无法写入安装文件, 系统无法正常安装. '; } $ret['write']['database']['ok'] = is_writable(PATH_ROOT . '/../config/database.php'); if ($ret['write']['database']['ok']) { $ret['write']['database']['value'] = ''; $ret['write']['database']['class'] = 'success'; } else { $ret['write']['database']['value'] = ''; $ret['write']['database']['class'] = 'danger'; $ret['write']['database']['failed'] = true; $ret['write']['database']['remark'] = 'config/database.php文件无法写入, 将无法写入数据库配置文件, 系统无法正常安装. '; } $ret['continue'] = true; foreach ($ret['php'] as $opt) { if ($opt['failed']) { $ret['continue'] = false; break; } } foreach ($ret['write'] as $opt) { if ($opt['failed']) { $ret['continue'] = false; break; } } tpl_install_env($ret); } /** *配置数据库信息 */ if ($action == 'db') { if ($ispost) { if ($_POST['do'] != 'continue') { setcookie('action', 'env'); header('location: ?refresh'); exit(); } $db = $_POST['db']; $user = $_POST['user']; $store = $_POST['store']; $link = @mysqli_connect($db['server'], $db['username'], $db['password']); if (mysqli_connect_errno()) { $error = mysqli_connect_errno(); if (strpos($error, '1045') !== false) { $error = '您的数据库访问用户名或是密码错误.
'; } } else { mysqli_query($link, "SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary"); mysqli_query($link, "SET sql_mode=''"); if (mysqli_errno($link)) { $error = mysqli_error($link); } else { $query = mysqli_query($link, "SHOW DATABASES LIKE '{$db['name']}';"); if (!mysqli_fetch_assoc($query)) { if (mysqli_get_server_info($link) > '4.1') { mysqli_query($link, "CREATE DATABASE IF NOT EXISTS `{$db['name']}` DEFAULT CHARACTER SET utf8"); } else { mysqli_query($link, "CREATE DATABASE IF NOT EXISTS `{$db['name']}`"); } } $query = mysqli_query($link, "SHOW DATABASES LIKE '{$db['name']}';"); if (!mysqli_fetch_assoc($query)) { $error .= "数据库不存在且创建数据库失败.
"; } if (mysqli_errno($link)) { $error .= mysqli_error($link); } } } if (empty($error)) { $pieces = explode(':', $db['server']); $db['port'] = !empty($pieces[1]) ? $pieces[1] : '3306'; $config = db_config(); $cookiepre = local_salt(4) . '_'; $authkey = local_salt(8); $config = str_replace(array( '{db-server}', '{db-username}', '{db-password}', '{db-port}', '{db-name}', '{db-prefix}' ), array( $db['server'], $db['username'], $db['password'], $db['port'], $db['name'], $db['prefix'] ), $config); mysqli_close($link); $link = mysqli_connect($db['server'], $db['username'], $db['password']); mysqli_select_db($link, $db['name']); mysqli_query($link, "SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary"); mysqli_query($link, "SET sql_mode=''"); //循环添加数据 if (file_exists(PATH_ROOT . '/install/install_base.sql')) { $sql = file_get_contents(PATH_ROOT . '/install/install_base.sql'); //添加初始化数据 if ($_POST['initdata']) { $sql .= file_get_contents(PATH_ROOT . '/install/initdata.sql'); } $sql = str_replace('#__', $db['prefix'], $sql); $sql = str_replace("\r", "\n", $sql); $sql = explode(";\n", $sql); foreach ($sql as $item) { $item = trim($item); if (empty($item)) continue; preg_match('/CREATE TABLE `([^ ]*)`/', $item, $matches); if ($matches) { $table_name = $matches[1]; $result = mysqli_query($link, $item); } else { $result = mysqli_query($link, $item); } if (!$result) { die(''); } } } else { die(''); } //更新安装时间 $setup_date = date("Y-m-d H:i:s", time()); mysqli_query($link, "update {$db['prefix']}config set value = '{$setup_date}' where code = 'setup_date'"); //添加用户管理员 $password = md5($user['password']); $insert_error = mysqli_query($link, "INSERT INTO {$db['prefix']}admin (admin_name, admin_password, admin_is_super, admin_gid) VALUES('{$user['username']}', '{$password}', '1', '0')"); if (!$insert_error) { die(''); } $store_name = $store['store_name']; $member_name = $store['username']; $seller_name = $member_name; $member_password = $store['password']; // 创建店铺 mysqli_query($link, "INSERT INTO {$db['prefix']}member (`member_id`,`member_name`,`member_password`,`member_nickname`,`member_email`,`member_addtime`,`member_logintime`,`member_old_logintime`) VALUES ('1', '{$member_name}','" . md5($member_password) . "', '惠利玛_123456', '', '" . time() . "', '" . time() . "', '" . time() . "')"); mysqli_query($link, "INSERT INTO {$db['prefix']}membercommon (`member_id`) VALUES ('1')"); mysqli_query($link, "INSERT INTO {$db['prefix']}store (`store_id`,`store_name`,`grade_id`,`member_id`,`member_name`,`seller_name`,`store_state`,`store_addtime`) VALUES ('1','{$store_name}','1','1','{$member_name}','{$seller_name}','1', '" . time() . "')"); mysqli_query($link, "INSERT INTO {$db['prefix']}storejoinin (`member_id`,`member_name`,`seller_name`,`store_name`,`joinin_state`) VALUES ('1', '{$member_name}', '{$seller_name}', '{$store_name}', '40')"); mysqli_query($link, "INSERT INTO {$db['prefix']}seller (`seller_id`,`seller_name`,`member_id`,`sellergroup_id`,`store_id`,`is_admin`) VALUES ('1', '{$seller_name}', '1', '0', '1', '1')"); mysqli_query($link, "INSERT INTO {$db['prefix']}storebindclass (`bid`, `store_id`, `commis_rate`, `class_1`, `class_2`, `class_3`, `state`) VALUES ('1', '1', '0', '0', '0', '0', '1')"); mysqli_query($link, "update {$db['prefix']}goods set is_platform_store = 1 where store_id = 1"); mysqli_query($link, "update {$db['prefix']}goodscommon set is_platform_store = 1 where store_id = 1"); mysqli_query($link, "update {$db['prefix']}store set is_platform_store = 1 where store_id = 1"); mysqli_query($link, "update {$db['prefix']}store set bind_all_gc = 1 where store_id = 1"); if ($_POST['initdata']) { mysqli_query($link, "update {$db['prefix']}goods set store_name = '{$store_name}'"); mysqli_query($link, "update {$db['prefix']}goodscommon set store_name = '{$store_name}'"); } //配置数据库 file_put_contents(PATH_ROOT . '/../config/database.php', $config); //生成辨识 touch(PATH_ROOT . '/install/install.lock'); setcookie('action', 'finish'); header('location: ?refresh'); exit(); } } tpl_install_db($error); } /** * 安装完成 */ if ($action == 'finish') { setcookie('action', '', time() - 3600); $sitepath = strtolower(substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'))); $sitepath = str_replace('/install', "", $sitepath); $url = strtolower('http://' . $_SERVER['HTTP_HOST'] . $sitepath); tpl_install_finish($url); } function tpl_install_license() { echo <<
阅读许可协议

版权所有 (c)2017,DsMall开源商城团队保留所有权利。

感谢您选择DsMall开源商城(以下简称DsMall,DsMall基于 PHP + MySQL的技术开发,全部源码开放。
为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:

一、本授权协议适用且仅适用于DsMall开源商城系统(以下简称DsMall)任何版本,DsMall开源商城官方对本授权协议的最终解释权。

二、协议许可的权利

  1. 您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。
  2. 您可以在协议规定的约束和限制范围内修改DsMall开源商城源代码或界面风格以适应您的网站要求。
  3. 您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。
  4. 获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。

三、协议规定的约束和限制

  1. 未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。
  2. 未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。
  3. 未经官方许可,禁止在DsMall开源商城的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。
  4. 如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。

四、有限担保和免责声明

  1. 本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。
  2. 用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。
  3. 电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DsMall,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
  4. 如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。

EOF; tpl_frame(); } function tpl_frame() { global $action, $actions; $action = $_COOKIE['action']; $step = array_search($action, $actions); $steps = array(); for ($i = 0; $i <= $step; $i++) { if ($i == $step) { $steps[$i] = ' step-info'; } else { $steps[$i] = ' step-success'; } } $progress = $step * 25 + 25; $curent_version = file_get_contents('../../app/version.php'); $content = ob_get_contents(); ob_clean(); $tpl = << 安装系统 - DsMall开源商城
1许可协议
2环境监测
3参数配置
4安装成功
{$progress}%
{$content}
EOF; echo trim($tpl); } function local_writeable($dir) { $writeable = 0; if (!is_dir($dir)) { @mkdir($dir, 0777); } if (is_dir($dir)) { if ($fp = fopen("$dir/test.txt", 'w')) { fclose($fp); unlink("$dir/test.txt"); $writeable = 1; } else { $writeable = 0; } } return $writeable; } function tpl_install_env($ret = array()) { if (!$ret['continue']) { $continue = ''; } else { $continue = ''; } echo <<
服务器信息
参数
服务器操作系统 {$ret['server']['os']['value']} {$ret['server']['os']['remark']}
Web服务器环境 {$ret['server']['sapi']['value']} {$ret['server']['sapi']['remark']}
PHP版本 {$ret['server']['php']['value']} {$ret['server']['php']['remark']}
程序安装目录 {$ret['server']['dir']['value']} {$ret['server']['dir']['remark']}
磁盘空间 {$ret['server']['disk']['value']} {$ret['server']['disk']['remark']}
上传限制 {$ret['server']['upload']['value']} {$ret['server']['upload']['remark']}
PHP环境要求必须满足下列所有条件,否则系统或系统部份功能将无法使用。
PHP环境要求
选项 要求 状态 说明及帮助
PHP版本 7.1<= PHP <=7.2 {$ret['php']['version']['value']} {$ret['php']['version']['remark']}
MySQL 支持(建议支持PDO)
版本 5.50<= MYSQL <=5.6
{$ret['php']['mysql']['value']} {$ret['php']['pdo']['remark']}
PDO_MYSQL 支持(强烈建议支持) {$ret['php']['pdo']['value']}
allow_url_fopen 支持(建议支持cURL) {$ret['php']['fopen']['value']} {$ret['php']['curl']['remark']}
cURL 支持(强烈建议支持) {$ret['php']['curl']['value']}
GD2 支持 {$ret['php']['gd']['value']} {$ret['php']['gd']['remark']}
openssl 支持 {$ret['php']['openssl']['value']} {$ret['php']['openssl']['remark']}
bcmath 支持 {$ret['php']['bcmath']['value']} {$ret['php']['bcmath']['remark']}
DOM 支持 {$ret['php']['dom']['value']} {$ret['php']['dom']['remark']}
session.auto_start 关闭 {$ret['php']['session']['value']} {$ret['php']['session']['remark']}
asp_tags 关闭 {$ret['php']['asp_tags']['value']} {$ret['php']['asp_tags']['remark']}
系统要求DsMall开源商城安装目录下的runtime和uploads必须可写, 才能使用DsMall开源商城所有功能。
目录权限监测
目录 要求 状态 说明及帮助
/ public/uploads目录可写 {$ret['write']['root']['value']} {$ret['write']['root']['remark']}
/ runtime目录可写 {$ret['write']['data']['value']} {$ret['write']['data']['remark']}
/ public/install目录可写 {$ret['write']['install']['value']} {$ret['write']['install']['remark']}
/ config/database.php文件可写 {$ret['write']['database']['value']} {$ret['write']['database']['remark']}
EOF; tpl_frame(); } function tpl_install_db($error = '') { if (!empty($error)) { $message = '
发生错误: ' . $error . '
'; } $insTypes = array(); if (!empty($_POST['type'])) { $insTypes = array(); $insTypes[$_POST['type']] = ' checked="checked"'; } $disabled = empty($insTypes['local']) ? ' disabled="disabled"' : ''; echo <<
安装选项
数据库选项
管理选项

管理员密码不少于六个字符

官方店铺信息

用户会员中心登录

商家和会员登录的密码一致

EOF; tpl_frame(); } function db_config() { $cfg = << env('database.driver', 'mysql'), // 自定义时间查询规则 'time_query_rule' => [], // 自动写入时间戳字段 // true为自动识别类型 false关闭 // 字符串则明确指定时间字段类型 支持 int timestamp datetime date 'auto_timestamp' => true, // 时间字段取出后的默认时间格式 'datetime_format' => 'Y-m-d H:i:s', // 数据库连接配置信息 'connections' => [ 'mysql' => [ // 数据库类型 'type' => env('database.type', 'mysql'), // 服务器地址 'hostname' => env('database.hostname', '{db-server}'), // 数据库名 'database' => env('database.database', '{db-name}'), // 用户名 'username' => env('database.username', '{db-username}'), // 密码 'password' => env('database.password', '{db-password}'), // 端口 'hostport' => env('database.hostport', '{db-port}'), // 数据库连接参数 'params' => [], // 数据库编码默认采用utf8 'charset' => env('database.charset', 'utf8'), // 数据库表前缀 'prefix' => env('database.prefix', '{db-prefix}'), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 'deploy' => 0, // 数据库读写是否分离 主从式有效 'rw_separate' => false, // 读写分离后 主服务器数量 'master_num' => 1, // 指定从服务器序号 'slave_no' => '', // 是否严格检查字段是否存在 'fields_strict' => true, // 是否需要断线重连 'break_reconnect' => false, // 监听SQL 'trigger_sql' => env('app_debug', true), // 开启字段缓存 'fields_cache' => false, // 字段缓存路径 'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR, ], // 更多的数据库配置信息 ], ]; EOF; return trim($cfg); } function local_salt($length = 8) { $result = ''; while (strlen($result) < $length) { $result .= sha1(uniqid('', true)); } return substr($result, 0, $length); } function tpl_install_finish($url) { echo <<

安装完成

恭喜您!已成功安装“DsMall开源商城商城”系统,您现在可以: 访问网站首页 访问网站后台
EOF; tpl_frame(); }