在 URL規(guī)則中,設(shè)置有 共享欄目與內(nèi)容 和 產(chǎn)品類型,兩個屬于同一類別,都是 共享欄目與內(nèi)容
在兩個規(guī)則中,內(nèi)容頁都自定義了規(guī)則,分別是 myurl 以及 producturl
在常規(guī)欄目中調(diào)用的是 myrul規(guī)則, 在產(chǎn)品頁中,調(diào)用的是producturl,現(xiàn)在發(fā)現(xiàn), 同樣能使用 myurl 的規(guī)則打開
在rewrite.php 中是這樣寫的:
if (CMSURI) {
$myfile = WRITEPATH . 'myid/' . md5(CMSURI) . '.txt';
if (is_file($myfile)) {
$id = file_get_contents($myfile);
if ($id) {
return [
CMSURI => 'index.php?c=show&id=' . $id, // 這里寫內(nèi)容的地址
];
}
}
}
if (CMSURI) { $myfile = WRITEPATH . 'myid/' . md5(CMSURI) . '.txt'; if (is_file($myfile)) { $id = file_get_contents($myfile); if ($id) { return [ CMSURI => 'index.php?c=show&id=' . $id, // 這里寫內(nèi)容的地址 ]; } } $myfile = WRITEPATH . 'producturl/' . md5(CMSURI) . '.txt'; if (is_file($myfile)) { $id = file_get_contents($myfile); if ($id) { return [ CMSURI => 'index.php?c=show&id=' . $id, // 這里寫內(nèi)容的地址 ]; } } }開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!