0

我正在阅读 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

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

4

0 回答 0