After following, you can keep track of his dynamic information in a timely manner
依赖注入导入的Request应该是think\facade\Request,而不是think\Request
2019-09-090个赞
Courses in the relevant section:Download and start the PHP toolbox
define('USER_ID', Session::has('user_id') ? Session::get('user_id'):null); 这段代码什么意思,尤其问号后边是什么?
致命错误: Call to a member function getData() on null $result->getData()这个问题该怎么解决,请老师费心指教! //渲染编辑管理员界面 54. public function edit(Request $request) 55. { 56. $user_id = $request -> param('id'); 57. $result = UserModel::get($user_id); 58. $this->view->assign('title','编辑管理员信息'); 59. $this->view->assign('keywords','php.cn'); 60. $this->view->assign('desc','PHP中文网ThinkPHP5开发实战课程'); 61. $this->view->assign('user_info',$result->getData()); 62. return $this->view->fetch('admin_edit'); $result->getData()这个问题该怎么解决,请老师费心指教!
2019-09-260个赞
__STATIC__常量路径替换不成功? 验证码不显示???
安装扩展库captcha总是失败
2019-09-020个赞
Courses in the relevant section:Logout and login: use session to achieve
用户登录是一个拦路虎,无法正常登录,很郁闷
2019-09-020个赞
Courses in the relevant section:Class list display and status modification: model query
tp51中的软删除的恢复是不是跟tp5中不一样啊
2019-09-220个赞
Courses in the relevant section:The correct way to configure updates
public function update(Request $request) { $data = $request -> param(); $map = ['is_update' => $data['is_update']]; $result = SystemModel::update($data,$map); if ($result !== null){ $status = 1; $message = 'success'; }else{ $status = 0; $message = 'failure'; } return ['status' => $status, 'message' => $message]; } 这段代码报错:未定义数组索引: is_update $system = SystemModel::get(1); $this->view->assign('system',$system); $this->view->assign('title','系统设置'); return $this->view->fetch('system_list'); } public function update(Request $request) { $data = $request -> param(); $map = ['is_update' => $data['is_update']]; $result = SystemModel::update($data,$map); if ($result !== null){ $status = 1; $message = 'success'; }else{ $status = 0; $message = 'failure'; } return json(['status' => $status, 'message' => $message]);
2019-09-240个赞
Courses in the relevant section:Preliminary implementation of user registration function
注册内容能写入数据库,可是没有任何信息提示
2019-09-060个赞
Courses in the relevant section:laravel configuration and routing-1
lara 工作流程 1、配置文件数据库 2、设置路由 3、操作控制器 4、创建页面
2019-11-280个赞