迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
這個(gè)自建方法,我要把fid存到數(shù)據(jù)庫,后臺(tái)沒有創(chuàng)建字段,直接數(shù)據(jù)庫創(chuàng)建的,怎么存,data那個(gè)數(shù)組是在哪里進(jìn)行存處理的,我沒找到,能說一下么
\\\\\\\\\\\\\\\\\\\\\\\\
完全看不明白
回復(fù)迅??蚣軇?chuàng)始人、
我是要用add方法把一個(gè)fid字段存到數(shù)據(jù)庫,添加的時(shí)候,把這個(gè)直接跟隨內(nèi)容一起入庫
public function add() { $id = 0; $fid = intval(\Phpcmf\Service::L('input')->get('fid')); $did = intval(\Phpcmf\Service::L('input')->get('did')); $catid = intval(\Phpcmf\Service::L('input')->get('catid')); $did && $this->auto_save = 0; // 草稿數(shù)據(jù)時(shí)不加載 $draft = $did ? $this->content_model->get_draft($did) : []; $catid = $draft['catid'] ? $draft['catid'] : $catid; // 欄目id不存在時(shí)就去第一個(gè)可用欄目為catid if (!$catid) { list($select, $catid) = \Phpcmf\Service::L('Tree')->select_category( $this->module['category'], $catid, 'id=\'dr_catid\' name=\'catid\' onChange="show_category_field(this.value)"', '', 1, 1, 1 ); } else { $select = \Phpcmf\Service::L('Tree')->select_category( $this->module['category'], $catid, 'id=\'dr_catid\' name=\'catid\' onChange="show_category_field(this.value)"', '', 1, 1 ); } $this->is_get_catid = $catid; $draft && $draft['catid'] = $catid; list($tpl) = $this->_Post($id, $draft, $fid); \Phpcmf\Service::V()->assign([ 'did' => $did, 'form' => dr_form_hidden(['is_draft' => 0, 'module' => MOD_DIR, 'id' => $id]), 'select' => $select, 'draft_url' =>\Phpcmf\Service::L('Router')->url(APP_DIR.'/home/add'), 'draft_list' => $this->content_model->get_draft_list('cid='.$id), 'menu' => \Phpcmf\Service::M('auth')->_module_menu( $this->module, ' <i class="'.dr_icon($this->module['icon']).'"></i> '.dr_lang('%s管理', $this->module['cname']), \Phpcmf\Service::L('Router')->url(APP_DIR.'/home/index'), \Phpcmf\Service::L('Router')->url(APP_DIR.'/home/add', ['catid' => $catid]) ), 'category_field_url' => $this->module['category_data_field'] ?\Phpcmf\Service::L('Router')->url(APP_DIR.'/home/add') : '' ]); \Phpcmf\Service::V()->display($tpl); }
add類根本不用改動(dòng),直接改這個(gè)文檔
http://m.223987.com/doc/850.html
找個(gè)uid怎么獲取,我直接寫死都不行嗎?是不是要獲取才行
回復(fù)迅睿框架創(chuàng)始人
回復(fù)迅??蚣軇?chuàng)始人
方便的很啊
是這樣嗎,但是數(shù)據(jù)庫沒存進(jìn)去.....值是有的
我看錯(cuò)了,這個(gè)data是讀取動(dòng)作,提交保持用3樓兄弟的辦法
我要把列表改成這樣,這個(gè)字符在哪加
$data[1]['uid'] 本身就會(huì)有的
回復(fù)@易學(xué)習(xí)
var_dump($data);
exit;
看看輸出什么
回復(fù)@易學(xué)習(xí)空的,手冊(cè)也不完善
這個(gè)方法我用無數(shù)次了,你居然說不行
完全看不明白
回復(fù)迅??蚣軇?chuàng)始人、
我是要用add方法把一個(gè)fid字段存到數(shù)據(jù)庫,

添加的時(shí)候,把這個(gè)直接跟隨內(nèi)容一起入庫
add類根本不用改動(dòng),直接改這個(gè)文檔
http://m.223987.com/doc/850.html
找個(gè)uid怎么獲取,我直接寫死都不行嗎?是不是要獲取才行
回復(fù)迅睿框架創(chuàng)始人

找個(gè)uid怎么獲取,我直接寫死都不行嗎?是不是要獲取才行
回復(fù)迅??蚣軇?chuàng)始人

方便的很啊
是這樣嗎,但是數(shù)據(jù)庫沒存進(jìn)去.....值是有的
我看錯(cuò)了,這個(gè)data是讀取動(dòng)作,提交保持用3樓兄弟的辦法
我要把列表改成這樣,這個(gè)字符在哪加
回復(fù)迅??蚣軇?chuàng)始人
$data[1]['uid'] 本身就會(huì)有的
回復(fù)@易學(xué)習(xí)

var_dump($data);
exit;
看看輸出什么
回復(fù)@易學(xué)習(xí)空的,手冊(cè)也不完善
這個(gè)方法我用無數(shù)次了,你居然說不行