mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2025-01-18 23:12:23 +08:00
use $_SERVER['REQUEST_URI'] but not rewrite param as path
This commit is contained in:
parent
12c0b21e8e
commit
730d7486a0
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,6 +8,7 @@ vendor/
|
||||
composer.phar
|
||||
.well-known/
|
||||
.user.ini
|
||||
php.ini
|
||||
|
||||
# 忽略数据
|
||||
data
|
||||
|
@ -3,4 +3,4 @@ RewriteEngine On
|
||||
RewriteCond $0 !index.php.*
|
||||
RewriteCond $0 !debug.php.*
|
||||
RewriteCond $0 !assets.*
|
||||
RewriteRule .* index.php?p=$0 [QSA]
|
||||
RewriteRule .* index.php [QSA]
|
||||
|
@ -26,14 +26,17 @@
|
||||
- PHP 模块 `xml` (也可能叫做 `dom`)
|
||||
- PHP 模块 `mbstring`
|
||||
- PHP 模块 `fileinfo`
|
||||
- composer 工具以安装项目依赖
|
||||
- composer 工具以安装项目依赖 (也可以将 compose 工具直接安装在网站根目录)
|
||||
- 在 php.ini 中设置 `display_errors` 以及 `display_startup_errors` 为 `Off` (或者关闭 `E_WARNING` 及以下 log) <small>(这是由于最开始写代码极不上心导致很多地方都会有可能报出 warn,输出在屏幕上会导致很糟糕的使用体验)</small>
|
||||
- 在网站的 php.ini 或者其它任何地方 php 配置 `open_basedir` 为只有 ph-bookshelf 本身的目录,以避免路径攻击。
|
||||
|
||||
<br/>
|
||||
|
||||
### 使用
|
||||
|
||||
未来可能会拖出来一个示例之类的...
|
||||
可以根据 [#web-server 环境要求] 就像普通 php 网站那样自行安装。
|
||||
|
||||
如果想要更详细的安装教程,可以尝试阅读(还在更新中的)[ph-bookshelf Wiki](https://book.sukazyo.cc/ph-bookshelf)
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
const APP_NAME = "ph-Bookshelf";
|
||||
|
||||
const VERSION = "0.5.0-alpha11";
|
||||
const VERSION = "0.5.0-alpha12";
|
||||
const CHANNEL = "suk-ws";
|
||||
const BRANCH = "config-v2.0";
|
||||
|
@ -17,7 +17,7 @@ try {
|
||||
SiteMeta::load();
|
||||
|
||||
// 格式化所给链接,并将链接转化为路径字符串数组
|
||||
$req = array_key_exists('p', $_GET) ? $_GET['p'] : "";
|
||||
$req = substr(urldecode($_SERVER['REQUEST_URI']), 1);
|
||||
if (strlen($req) > 0 && $req[strlen($req) - 1] === '/')
|
||||
$tmp = substr($req, 0, -1);
|
||||
$uri = explode("/", $req, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user