联系官方销售客服
1835022288
028-61286886
注册用户之后,开通空间?应该怎么写呢?
参考了采集插件的写法,但是报500错误,有没哪位高手指点一下!
\Phpcmf\Hooks::on('member_register_after', function($data) { //var_dump($data['username']); $this->_module_init('zone'); $save[1]['uid'] = $data['id']; $save[1]['title'] = $data['username']; $save[1]['author'] = $data['username']; $save[1]['url'] = ''; $save[1]['status'] = 9; //9表示正常发布,1表示审核里面 $save[1]['hits'] = 0; $save[1]['displayorder'] = 0; $save[1]['link_id'] = 0; $save[1]['comments'] = 0; $save[1]['avgsort'] = 0; $save[1]['inputtime'] = $save[1]['updatetime'] = SYS_TIME + rand(0, 7200); $save[1]['inputip'] = '127.0.0.1'; $rt = $this->content_model->save(0, $save); if ($rt['code']) { exit('成功'); } else { exit('失败'); } });