Cakephp路由自动无添加索引操作

时间:2013-06-18 16:51:47

标签: cakephp routing

我正在阅读cakephp中的路由以创建一个漂亮的URL。我这样做:

Router::connect('/p/*', array('controller' => 'productSaleOptions', 'action' => 'viewByProduct'));

然后在模板文件中我这样做

<?= $html->link($new_smartphone_products_sale[$index]['Product']['name'], array("controller" => "p", $new_smartphone_products_sale[$index]['Product']['slug'], "slug")); ?>

我不明白为什么回应这个链接:

http://localhost/Viettablet/p/index/iphone-5-32gb-quoc-te-ll

我不明白为什么动作“索引”会出现? 请帮帮我,谢谢

0 个答案:

没有答案