Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 用YII重新编写Url_Php_Yii - Fatal编程技术网

Php 用YII重新编写Url

Php 用YII重新编写Url,php,yii,Php,Yii,我正在尝试使用YII重新编写URL。 有没有办法显示像.html或.php这样的页面扩展名? 请帮助我是YII新手。使用参数 array( ...... 'components'=>array( ...... 'urlManager'=>array( 'urlFormat'=>'path', 'rules'=>array( 'pattern1'=

我正在尝试使用YII重新编写URL。 有没有办法显示像.html或.php这样的页面扩展名? 请帮助我是YII新手。

使用参数

array(
    ......
    'components'=>array(
        ......
        'urlManager'=>array(
            'urlFormat'=>'path',
            'rules'=>array(
                'pattern1'=>'route1',
                'pattern2'=>'route2',
                'pattern3'=>'route3',
            ),
            'urlSuffix' => '.html'
        ),
    ),
);

我应该把它放进主管道吗。php@JamesMartin除非配置文件的名称不同