《CMS教程:phpcms v9如何獲得數據庫模型》要點:
本文介紹了CMS教程:phpcms v9如何獲得數據庫模型,希望對您有用。如果有疑問,可以聯系我們。
相關主題:PHPCMS教程
導讀:工作中遇到的一個問題,如何獲得欄目下的模型,現在代碼分享出來,供大家學習獲得模型數據庫$siteids = getcache('category_content&...
工作中遇到的一個問題,如何獲得欄目下的模型,現在代碼分享出來,供大家學習
獲得模型數據庫
???$siteids = getcache('category_content', 'commons');
???$MODEL = getcache('model', 'commons');
???$siteid = $siteids[$catid];
???$CATEGORYS = getcache('category_content_'.$siteid, 'commons');
???$category = $CATEGORYS[$catid];
???$modelid = $category['modelid'];
???$this->content_db->set_model($modelid);
???$tablename = $this->content_db->db_tablepre.$MODEL[$modelid]['tablename'];
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/6019.html