环境要求
操作系统
Linux/Unix 或 Windows
软件环境
Apache/Nginx , PHP 5.4+ 或 PHP 7+(请将PHP的运行方式修改为PATH_INFO!)
安装步骤
- 配置 apache/nginx 服务器,请将网站的根目录配置到 <网站目录>;
- 上传 源代码到您<网站目录>
- 给 <网站目录>/datas 文件夹及子文件夹加上写入权限
Nginx参考配置
server{
listen 80;
server_name demo.daicuo.org;
index index.php index.html index.htm default.html default.htm default.php;
root /home/wwwroot/demo.daicuo.org;
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ index.php?s=/$1 last;
break;
}
}
include enable-php-pathinfo.conf;
location ~ .*\.(s3db|db|db3|tpl)$
{
deny all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/demo.daicuo.org.log;
}
Apache参考配置
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot d:/wwwroot/example.com
</VirtualHost>