### 環境需求
***
```
PHP >= 5.6
PDO PHP Extension
MBstring PHP Extension
CURL PHP Extension
```
### 開始安裝
***
源碼倉庫:
`Github` : https://github.com/iredcap/pay
`Gitee` :https://gitee.com/iredcap/pay
>[info]如果國內訪問composer的速度比較慢,可以參考這里的說明使用 [國內鏡像](https://pkg.phpcomposer.com/)
首先克隆下載應用項目倉庫
`git clone https://github.com/iredcap/pay
`
然后切換到目錄下面,再Composer安裝Thinkphp5核心框架倉庫以及依賴包:
`composer install `
完成依賴包和Tp5核心包的安裝
常見安裝問題:
1. PHP7.0以上出現 `No input file specified
`
```
//.htaccess 文件 RewriteRule 參考配置
^(.*)$ index.php [L,E=PATH_INFO:$1]
^(.*)$ index.php?/$1 [QSA,PT,L]
```
2. phpStudy環境 PHP5.6.27-nts+Apache:session_start(): Cannot send session cache limiter - headers already sent
php.ini文件中把always_populate_raw_post_data = -1前面的注釋去掉就可以了
3. LNMP下500錯誤參考
`fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/:/tmp/:/proc/";
`
根據實際情況修改或注釋掉上面這句
4. phpstudy環境下若出現提交數據500錯誤
將public 目錄下 .htaccess 文件中 RewriteRule 部分換為` ^(.*)$ index.php [L,E=PATH_INFO:$1] `即可解決。
5. 某些Nginx版本下出現,控制器不存在問題,參考以下配置
```
server {
listen 80;
root /www/wwwroot/iredcap/public/;
index index.php index.html index.htm;
server_name www.iredcap.cn redcap.cn;
location / {
# try_files $uri $uri/ =404;
index index.php
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Method GET,POST,PUT,DELETE,OPTIONS;
try_files $uri @rewrite;
}
#重寫規則
location @rewrite {
#如果有admin.php 文件,重寫
rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;
#如果有 index.php 文件 ,重寫
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
#重寫到 index.php
rewrite . /index.php?s=$uri last;
}
}
```