Skip to content

Commit 0b615dc

Browse files
authored
Merge pull request #2 from BirkhoffLee/patch-2
Update README.md
2 parents 7d9b99e + ce749ab commit 0b615dc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232

3333
# 範例
3434

35-
你需要先在你的 `.htacess` 新增這樣的規則,並將之後的網頁都導向 `index.php`
36-
37-
如此一來才能夠在 `index.php` 中處理任何的路由事宜。
35+
若你在使用 Apache Server,
36+
請先新增一個 `.htacess` 檔案,並加入以下內容。
37+
且請將所有 requests 都導向 `index.php`
38+
如此一來 Davai 才能接收任何的路由事宜並進行處理。
3839

3940
```
4041
RewriteEngine on
41-
# PHP Extension To None PHP Extension
42+
# PHP Extension To None-PHP Extensions
4243
# RewriteRule ^ /%1 [R=301,NE,L]
4344
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/(.+)\.php[^\s]* [NC]
4445
RewriteRule ^ - [R=404,L]
4546
46-
47-
# Hide Extension Of PHP
47+
# Hide PHP Extensions
4848
RewriteCond %{REQUEST_FILENAME} !-d
4949
RewriteCond %{REQUEST_FILENAME}.php -f
5050
RewriteCond %{REQUEST_FILENAME} !-l
@@ -63,9 +63,9 @@ $davai = new Davai();
6363

6464
 
6565

66-
接下來開始撰寫路徑,其中的 `[i:userID]``i` 意思是任何數字,而 `userID` 則是變數名稱,
66+
接下來開始撰寫路徑,其中的 `[i:userID]``i` 代表「任何數字」,而 `userID` 則代表「變數名稱」。
6767

68-
你可以在詳細的教學文件中找到說明
68+
你稍後可以在詳細的教學文件中找到說明
6969

7070
```php
7171
$davai->get('/user/[i:userId]', function($userId)

0 commit comments

Comments
 (0)