本教材需要PHP技術(shù)的基礎(chǔ)
當(dāng)已有的url標(biāo)簽不滿足你的需求時,你可以使用函數(shù)標(biāo)簽來實現(xiàn)
例如我要將title標(biāo)題字段進(jìn)行轉(zhuǎn)化為拼音作為url時
標(biāo)題:中國人 URL:zhongguoren.html
1、定義一個自定義函數(shù)config/custom.php,例如mydiyurl函數(shù),函數(shù)名字你隨便寫
function mydiyurl($data) { // 漢字轉(zhuǎn)拼音 $py = dr_word2pinyin($data['title']); return $py.'.html'; }
2、填寫的url格式為
{mydiyurl($data)}
文檔最后更新時間:2019-06-17 12:38:00