ThinkAdmin for PHP
--
* ThinkAdmin 是一個基于 ThinkPHP 5.1.x 開發的后臺管理系統,集成后臺系統常用功能。
* 項目安裝及二次開發請參考 ThinkPHP 官方文檔及下面的服務環境說明,數據庫 SQL 文件存放于項目根目錄下。
>[error] 1. 注意:項目測試請另行搭建環境并創建數據庫(數據庫配置 config/database.php),切勿直接使用測試環境數據!
> 2. 如果系統提示“測試系統禁止操作等字樣”,可以修改項目路由配置(route/route.php),清空里面的路由記錄。
> 3. 當前版本基于 ThinkPHP 5.1.x 開發,對PHP版本要求不低于php 5.6,具體請查閱 ThinkPHP 官方文檔。
Documentation
--
PHP開發技術交流(QQ群 513350915)
[](http://shang.qq.com/wpa/qunwpa?idkey=ae25cf789dafbef62e50a980ffc31242f150bc61a61164458216dd98c411832a)
Repositorie
--
ThinkAdmin 為開源項目,允許把它用于任何地方,不受任何約束,歡迎 fork 項目。
>[info] GitHub 托管地址:https://github.com/zoujingli/ThinkAdmin
OSChina 托管地址:http://git.oschina.net/zoujingli/Think.Admin
對于新版本的微信模塊使用的是授權模式,需要用到 ThinkService 項目。
>[info] GitHub 托管地址:https://github.com/zoujingli/ThinkService
其安裝與 ThinkAdmin 相似,這里就不多說了。具體可以參見微信開放平臺官網
https://open.weixin.qq.com ,ThinkService 后臺具體可以配置對應參數。
ThinkAdmin 與 ThinkService 對接是通過 WebService 通信的,因此運行環境需要安裝 Soap 模塊支持。
Module
--
* 簡易`RBAC`權限管理(用戶、權限、節點、菜單控制)
* 自建秒傳文件上載組件(本地存儲、七牛云存儲,阿里云OSS存儲)
* 基站數據服務組件(唯一隨機序號、表單更新)
* `Http`服務組件(原生`CURL`封裝,兼容PHP多版本)
* 微信公眾號服務組件(基于[WeChatDeveloper](https://github.com/zoujingli/WeChatDeveloper),微信網頁授權獲取用戶信息、已關注粉絲管理、自定義菜單管理等等)
* 微信商戶支付服務組件(基于[WeChatDeveloper](https://github.com/zoujingli/WeChatDeveloper),支持JSAPI支付、掃碼模式一支付、掃碼模式二支付)
* 更多組件開發中...
Environment
---
>1. PHP 版本不低于 PHP5.6,推薦使用 PHP7 以達到最優效果;
>2. 需開啟 PATHINFO,不再支持 ThinkPHP 的 URL 兼容模式運行(源于如何優雅的展示)。
* Apache
```xml
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
```
* Nginx
```
server {
listen 80;
server_name demo.thinkadmin.top;
root /home/wwwroot/ThinkAdmin;
index index.php index.html index.htm;
add_header X-Powered-Host $hostname;
fastcgi_hide_header X-Powered-By;
if (!-e $request_filename) {
rewrite ^/(.+?\.php)/?(.*)$ /$1/$2 last;
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ \.php($|/){
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
if ($real_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
}
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param PHP_VALUE open_basedir=$document_root:/tmp/:/proc/;
access_log /home/wwwlog/domain_access.log access;
error_log /home/wwwlog/domain_error.log error;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
access_log off;
error_log off;
expires 30d;
}
location ~ .*\.(js|css)?$ {
access_log off;
error_log off;
expires 12h;
}
}
```
Copyright
--
* ThinkAdmin 基于`MIT`協議發布,任何人可以用在任何地方,不受約束
* ThinkAdmin 部分代碼來自互聯網,若有異議,可以聯系作者進行刪除
Sponsor
--

- ThinkAdmin
- 后臺開發介紹
- JS插件介紹與使用
- $.form 通用表單數據插件
- $.msg 通用消息彈出提示插件
- $.vali 通用表單驗證插件
- HTML默認綁定事件
- data-load 標準異常網絡請求
- data-open 內容區打開新頁
- data-modal Modal 彈出層
- data-reload 強制刷新內容區
- data-update 更新數據記錄
- data-href 打開新的網頁
- data-file 文件上傳
- data-iframe Iframe 打開網頁
- data-icon 打開圖標選擇器
- data-tips-image 顯示放大圖片
- data-tips-text 顯示文字TIPS
- data-phone-view 以手機模式顯示