From d79cce58e14b034c2b2e93ebdf1628ecc85064b6 Mon Sep 17 00:00:00 2001 From: shoushou Date: Wed, 29 Aug 2018 18:44:42 +0800 Subject: [PATCH] update from lys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 错别字修改 试用→使用 --- docs/guide-zh-CN/runtime-routing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guide-zh-CN/runtime-routing.md b/docs/guide-zh-CN/runtime-routing.md index 689ec69e87..f2400b37ff 100644 --- a/docs/guide-zh-CN/runtime-routing.md +++ b/docs/guide-zh-CN/runtime-routing.md @@ -43,15 +43,15 @@ $url = Url::to(['post/view', 'id' => 100]); - 默认URL格式; - 美化URL格式。 -默认URL格式试用一个参数`r`表示路由, -并且试用一般的参数格式表示请求参数。例如,`/index.php?r=post/view&id=100`表示路由为`post/view`,参数`id`为100。 +默认URL格式使用一个参数`r`表示路由, +并且使用一般的参数格式表示请求参数。例如,`/index.php?r=post/view&id=100`表示路由为`post/view`,参数`id`为100。 默认URL格式不需要为[[yii\web\UrlManager|URL管理器]]做任何配置, -并且在任何Web服务器都可以正常试用。 +并且在任何Web服务器都可以正常使用。 美化URL格式在脚本名称后面使用更多的路径信息表示路由和参数信息。 例如,用适当的[[yii\web\UrlManager::rules|URL规则]],`/index.php/post/100`中附加的路径信息`/post/100`表示 路由为`post/view`,参数`id`为100。 -要试用美化的URL格式,你需要根据实际的需求 +要使用美化的URL格式,你需要根据实际的需求 设计一组[[yii\web\UrlManager::rules|URL规则]]来规定URL的样式。 你可以仅设置[[yii\web\UrlManager|URL管理器]]中的[[yii\web\UrlManager::enablePrettyUrl|开启美化URL]]来切换两种URL格式, @@ -69,7 +69,7 @@ $url = Url::to(['post/view', 'id' => 100]); 如果使用默认URL格式,解析请求到路由只是简单的从`GET`请求中得到命名为`r`的参数。 -当试用美化URL格式时,[[yii\web\UrlManager|URL管理器]]将检查注册的[[yii\web\UrlManager::rules|URL规则]], +当使用用美化URL格式时,[[yii\web\UrlManager|URL管理器]]将检查注册的[[yii\web\UrlManager::rules|URL规则]], 找到一条可以匹配的将请求转到路由的规则。 如果找不到任何匹配的规则,系统将抛出[[yii\web\NotFoundHttpException]]异常。 @@ -280,7 +280,7 @@ echo Url::previous(); > Note: 如果你想在URL中隐藏入口脚本名称,除了要设置 [[yii\web\UrlManager::showScriptName|showScriptName]] 为 false, 同时应该配置 Web 服务,处理当请求 URL 没有特殊指定入口脚本时确定要执行哪个PHP文件, - 如果你试用 Apache Web server,你可以参考[安装](start-installation.md#recommended-apache-configuration)中推荐的配置。 + 如果你使用 Apache Web server,你可以参考[安装](start-installation.md#recommended-apache-configuration)中推荐的配置。