catchAdmin/README.md

105 lines
3.1 KiB
Markdown
Raw Normal View History

2018-11-16 17:45:37 +08:00
# think-admin
2018-12-09 09:28:40 +08:00
# ENV
- php >= 7.1.3
- mysql >= 5.5
2018-11-16 17:42:56 +08:00
2018-11-16 17:45:37 +08:00
# install
2019-01-24 09:14:48 +08:00
- curl -sS http://install.phpcomposer.com/installer | php
2018-11-16 17:45:37 +08:00
- composer config -g repo.packagist composer https://packagist.laravel-china.org
2019-01-17 16:37:41 +08:00
- composer update
- 修改根目录下 .env.emp .env
- .env 配置数据库信息
2018-11-16 17:45:37 +08:00
- php think migrate:run
2018-11-26 15:11:05 +08:00
- php think seed:run
2018-11-21 11:20:23 +08:00
# Use
- 配置虚拟域名 OR 在根目录下执行 php think run
- yourUrl/login
- 默认用户名 admin 密码 admin
2019-01-24 09:14:48 +08:00
# nginx 配置
```
server {
listen 端口;
server_name 域名;
access_log logs/wenwen.access.log;
root 项目目录/public;
index index.php index.html index.htm;
location / {
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root 项目目录/public;
fastcgi_pass phpfastcgi;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ^~ /data {
deny all;
}
}
```
2018-12-11 15:29:18 +08:00
# Problem
> SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'updated_at'
2018-12-11 15:31:39 +08:00
2018-12-11 15:29:18 +08:00
设置 sql_mode;
```
2018-12-11 15:31:39 +08:00
show variables like 'sql_mode' ;
```
> remove 'NO_ZERO_IN_DATE,NO_ZERO_DATE'
```
2018-12-11 15:29:18 +08:00
SET GLOBAL sql_mode='STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
```
2018-12-11 16:16:49 +08:00
# Test Address
2019-01-22 13:39:11 +08:00
<a href="http://view.njphper.com" target="__BLANK">测试地址</a>
2019-01-22 13:36:01 +08:00
- 账号test
- 密码: 123456
2018-11-26 22:50:18 +08:00
# Talking
2018-12-21 10:17:45 +08:00
- 可以提 ISSUE请按照 issue 模板提问
- 欢迎进入 Q 群,可以及时反馈一些问题。
2018-12-21 10:18:15 +08:00
- ![输入图片说明](https://images.gitee.com/uploads/images/2018/1219/110300_0257b6c0_810218.jpeg "微信图片_20181219105915.jpg")
2018-12-21 10:17:45 +08:00
2019-01-24 18:01:16 +08:00
仅供学习
# License
```
MIT License
Copyright (c) 2018 dkzwm
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```