我用这个打鼻涕:
<?php echo $this->Html->Link(__('more'), '/l/'. Inflector::slug($data['Object']['region']) .'/'. Inflector::slug($data['Object']['cat']) .'/'. Inflector::slug($data['Object']['title']) .'/'. $data['Object']['id'], array('class' => 'regular_btn'));?>获得良好的搜索引擎优化友好链接。到目前为止效果很好,结果看上去
.../l/reg/cat/Postmodern_luxury_residence_close_to_Real_Bendinat_golf_course/123
我只是希望能把它变成-而不是?这能改变吗?
谢谢!!
发布于 2016-03-30 08:00:32
它应该很简单
Inflector::slug($data['Object']['region'], '-')slug
https://stackoverflow.com/questions/36302859
复制相似问题