聯(lián)系官方銷售客服
1835022288
028-61286886
背景:在cache/field下新建了categories.php文件,自定義字段選擇了 Diy類型。
問題:如何在該頁面中調(diào)用欄目數(shù)據(jù)出來,要呈現(xiàn)層級關(guān)系的欄目數(shù)據(jù),
如按照原有文件 hanye.php修改后文件內(nèi)容為
<?php /** * Created by PhpStorm. * User: dayrui * Date: 2016/11/20 * Time: 08:28 */ $category = $this->ci->get_cache('module-'.SITE_ID.'-zhaopin', 'category'); $code = '<label>'.$this->ci->select_category($category, (int)$value, 'name=\'data['.$name.']\'', '--').'</label>';
則提示
Fatal error: Call to undefined method Page::select_category() in D:\phpStudy\WWW\client\doremi-audio\cache\field\categories.php on line 11
沒有定義
回復(fù)@易學(xué)習(xí) 要怎么做 按照系統(tǒng)原有文件給出代碼是 $this->ci里調(diào)用這個函數(shù)
diy字段要自己寫代碼的,不能調(diào)用系統(tǒng)的
層級,自己寫遞歸