+ -
当前位置:首页 → 问答吧 → URL伪静态 routes.php 反向生成URL

URL伪静态 routes.php 反向生成URL

时间:2011-07-13

来源:互联网

routes.php
<?php
return array(

    'News'=>array('/^Article\/([^\/]+?).html$/','News/content','name'),   
);
?>

http://localhost/Article/new-simple.html
能正常解析到 News/content下执行。
我想问给定name为new-simple的值如何更具routes规则反响生成 http://localhost/Article/new-simple.html 这个路径呢?

作者: zhongks   发布时间: 2011-07-13

谁来帮我解答一下?

作者: zhongks   发布时间: 2011-07-14