初始化配置

This commit is contained in:
zhaoxiang 2016-10-31 19:37:19 +08:00
parent 5d2c841cfe
commit cbae32c38f
10 changed files with 80 additions and 11 deletions

View File

@ -1 +0,0 @@
deny from all

View File

@ -0,0 +1,13 @@
<?php
/**
*
* @since 2016-02-18
* @author zhaoxiang <zhaoxiang051405@outlook.com>
*/
namespace app\admin\controller;
use think\Controller;
class Base extends Controller {
}

View File

@ -1,8 +1,7 @@
<?php
namespace app\admin\controller;
use \think\Controller;
class Index extends Controller {
class Index extends Base {
public function index() {
return $this->fetch();
}

View File

@ -10,9 +10,32 @@
// +----------------------------------------------------------------------
return [
'view_replace_str' => [
'__STATIC__'=>'/public/static/'
// +----------------------------------------------------------------------
// | 数据库配置
// +----------------------------------------------------------------------
'database' => [
// 数据库类型
'type' => 'mysql',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
'database' => '7d-vision',
// 数据库用户名
'username' => 'root',
// 数据库密码
'password' => '',
// 数据库连接端口
'hostport' => '27017',
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8',
// 数据库表前缀
'prefix' => '',
// 数据库调试模式
'debug' => false,
],
// +----------------------------------------------------------------------
// | 应用设置
// +----------------------------------------------------------------------
@ -134,7 +157,9 @@ return [
],
// 视图输出字符串内容替换
'view_replace_str' => [],
'view_replace_str' => [
'__STATIC__'=>'/public/static/'
],
// 默认跳转页面对应的模板文件
'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
'dispatch_error_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',

View File

@ -0,0 +1 @@
<?php

View File

@ -0,0 +1,11 @@
<?php
//配置文件
return [
//'配置项'=>'配置值'
'AUTH_TICKET' => 'HglxnX64SU)vFO08TrsIMMtetTzFH6mv4R(SAWjJNvxP(26fj1pf$0mTL0(siqlF',
'API_HOST' => 'http://vr-api-01.chinacloudapp.cn:5002/',
'API_USER_LOGIN' => 'api/user/login',
'API_USER_CODE' => 'api/user/code',
'API_USER_REGISTER' => 'api/user/register',
'API_USER_CHANGE_PWD' => 'api/user/changepwd',
];

View File

@ -0,0 +1,13 @@
<?php
/**
*
* @since 2016-02-18
* @author zhaoxiang <zhaoxiang051405@outlook.com>
*/
namespace app\index\controller;
use think\Controller;
class Base extends Controller {
}

View File

@ -1,10 +1,8 @@
<?php
namespace app\index\controller;
class Index
{
public function index()
{
return '<style type="text/css">*{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style="padding: 24px 48px;"> <h1>:)</h1><p> ThinkPHP V5<br/><span style="font-size:30px">十年磨一剑 - 为API开发设计的高性能框架</span></p><span style="font-size:22px;">[ V5.0 版本由 <a href="http://www.qiniu.com" target="qiniu">七牛云</a> 独家赞助发布 ]</span></div><script type="text/javascript" src="http://tajs.qq.com/stats?sId=9347272" charset="UTF-8"></script><script type="text/javascript" src="http://ad.topthink.com/Public/static/client.js"></script><thinkad id="ad_bd568ce7058a1091"></thinkad>';
class Index extends Base {
public function index() {
}
}

View File

@ -0,0 +1,9 @@
<?php
namespace app\index\model;
use think\Model;
class User extends Model
{
}

View File

@ -0,0 +1 @@
Hello