我正在阅读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
我不明白为什么动作“索引”会出现? 请帮帮我,谢谢