1、定义函数返回url规则代码
函数文件是config / custom.php,定义个名字,随便自己取,xxxurl
function dedeurl($d ata) {
return "/view.php?aid=".$d ata['id'];
2、在规则里面填写新标签:
{dedeurl($data)}
3、根目录新建文件view.php
修改config/rewrte.php,否则会出现404
加一行
"view\.php\?aid=([0-9]+)" => 'index.php?c=show&id=$1',