phpcm在訪問關(guān)于我們頁面的時候默認(rèn)執(zhí)行第一個欄目
來源:程序員人生 發(fā)布時間:2015-06-22 21:15:18 閱讀次數(shù):5254次
phpcm在訪問關(guān)于我們頁面的時候默認(rèn)執(zhí)行第一個欄目,意思是說,在導(dǎo)航條上面訪問關(guān)于我們頁面,顯示的是公司介紹。如果難理解,請看下面圖
如上圖。有個網(wǎng)站介紹欄目,當(dāng)我們訪問網(wǎng)站介紹欄目的時候,默認(rèn)顯示關(guān)于我們的頁面
方法如下:
打開phpcms\modules\content\index.php
將下面代碼
- public function lists() {
- $catid = $_GET['catid'] = intval($_GET['catid']);
修改為
- public function lists() {
- $catid = $_GET['catid'] = intval($_GET['catid']);
- if($catid==1)$catid=2;
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈