zend framework Zend_Controller_Router_Route
时间:2011-11-17
来源:互联网
路由规则怎么配置在哪里配置,我想重新配置URL
看了下一些文章,模模糊糊,不知道整个过程
是怎么样?谁可以说说,具体实现过程;例如下面的
PHP code
老的URL格式:
http://storefront/products.php/category/{categoryID}/product/{productID}
新的URL的格式:
http://storefront/product/{categoryName}/{productID}-{productIdent}.html
代码能够理解,就是不懂怎么弄到自己项目中去..
看了下一些文章,模模糊糊,不知道整个过程
是怎么样?谁可以说说,具体实现过程;例如下面的
PHP code
//新url的正则路由协议 $route = new Zend_Controller_Router_Route_Regex( 'product/([a-zA-Z-_0-9]+)/(\d+)-([a-zA-Z-_0-9]+).html', array( 'controller' => 'products', 'action' => 'view' ), array( 1 => 'categoryIdent', 2 => 'productID', 3 => 'productIdent' ), 'product/%s/%d-%s.html' );
老的URL格式:
http://storefront/products.php/category/{categoryID}/product/{productID}
新的URL的格式:
http://storefront/product/{categoryName}/{productID}-{productIdent}.html
代码能够理解,就是不懂怎么弄到自己项目中去..
作者: Xy_SuperMario 发布时间: 2011-11-17
新手求教啊,这样一个路由规则怎么添加啊~~~~
作者: Xy_SuperMario 发布时间: 2011-11-18
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28