迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
$this->content_model = \Phpcmf\Service::M('Content'); $this->content_model->_init('news',SITE_ID,'share'); $rt = $this->content_model->save(0, $save);
這樣保存的內(nèi)容為什么會提示內(nèi)容url保存不完整,請問,我寫錯了那里嘛?
要看$save的具體值
“內(nèi)容URL保存不完整“,我全站搜索了下,根本沒有這幾個字的錯誤提示語句
回復迅睿框架創(chuàng)始人 提示 內(nèi)容URL參數(shù)不完整
保存的內(nèi)容是
\Phpcmf\Service::C()->_module_init("news");
$rt = $this->content_model->save(0, $save);
var_dump($rt);
回復迅??蚣軇?chuàng)始人
我一直遇到這個錯誤! 前面我試過了。但上面那個方法就正常 就是保存后 內(nèi)容URL參數(shù)不完整
錯誤:[Phpcmf: Error] Call to a member function save() on null
97 $rt = $this->content_model->save(0, $save);
這個程序段是寫在哪個文件的?控制器類里面不應該會報錯的
我寫在app/caiji/models里面了。
不過我現(xiàn)在用這個方法實現(xiàn)了- -
$this->content_model = \Phpcmf\Service::M('Content');
$this->content_model->_init('news',SITE_ID,'share');
這樣就正常了 迅??蚣軇?chuàng)始人 謝謝!= =。不過這樣不知道算不算正常 !
$rt = \Phpcmf\Service::C()->content_model->save(0, $save);
非控制器類需要這樣寫
要看$save的具體值
“內(nèi)容URL保存不完整“,我全站搜索了下,根本沒有這幾個字的錯誤提示語句
回復迅睿框架創(chuàng)始人 提示 內(nèi)容URL參數(shù)不完整
保存的內(nèi)容是
\Phpcmf\Service::C()->_module_init("news");
$rt = $this->content_model->save(0, $save);
var_dump($rt);
回復迅??蚣軇?chuàng)始人
我一直遇到這個錯誤! 前面我試過了。但上面那個方法就正常 就是保存后 內(nèi)容URL參數(shù)不完整
錯誤:[Phpcmf: Error] Call to a member function save() on null
97 $rt = $this->content_model->save(0, $save);
這個程序段是寫在哪個文件的?控制器類里面不應該會報錯的
我寫在app/caiji/models里面了。
不過我現(xiàn)在用這個方法實現(xiàn)了- -
\Phpcmf\Service::C()->_module_init("news");
$this->content_model = \Phpcmf\Service::M('Content');
$this->content_model->_init('news',SITE_ID,'share');
$rt = $this->content_model->save(0, $save);
這樣就正常了 迅??蚣軇?chuàng)始人 謝謝!= =。不過這樣不知道算不算正常 !
\Phpcmf\Service::C()->_module_init("news");
$rt = \Phpcmf\Service::C()->content_model->save(0, $save);
非控制器類需要這樣寫