# pureblog **Repository Path**: wenjun-liu/pureblog ## Basic Information - **Project Name**: pureblog - **Description**: PureBlog 是一个基于 thinkphp5.1 风格简约的博客系统. 运行环境 PHP >= 5.6 环境 ArchLinux PHP/7.4 Nginx/1.18 Comp - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/pureblog - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2021-03-23 - **Last Updated**: 2022-06-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PureBlog 基于thinkphp5.1风格简约功能丰富的php博客系统 ## 我的运行环境 > PHP >= 5.6 - 环境 - ArchLinux - PHP/7.4 - Nginx/1.18 - Composer/1.10.16 - PHP扩展 - PDO PHP Extension - MBstring PHP Extension - GD PHP Extension --- ## MySQL 配置 #### 连接MySQL 修改 `config/database.php` #### 导入数据库文件 `blog.sql` --- ## URL重写 #### 1、[Apache] 1. `httpd.conf`配置文件中加载了`mod_rewrite.so`模块 2. `AllowOverride None` 将`None`改为 `All` 3. 把下面的内容保存为`.htaccess`文件放到应用入口文件的同级目录下 ``` Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] ``` #### 2、[Nginx] ``` try_files $uri $uri/ /index.php?s=$uri&$args; ``` Nginx低版本 ``` location / { // …..省略部分代码 if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } } ``` > 注意: 设置url重写后静态资源路径会失效,可以通过一下方式设置 ``` location /static/ { root /srv/nginx/blog/public/; # 请根据实际情况修改 } ``` ## LICENSE Apache