i并且无法更新从数据库中获取的图像,请帮助我。 我正在使用cakephp 3.6.7
这是我的updatecontroller页面
$profilepic=$this->request->data[‘image’][‘name’];
$myfolder= WWW_ROOT.DS.“files”.DS.“uploads”;
$dir = new Folder($myfolder, true, 0755);
move_uploaded_file($this->request->data[‘image’][‘tmp_name’], $myfolder.DS.$this->request->data[‘image’][‘name’]);
错误
Warning (2): Illegal string offset ‘name’ [APP/Controller\AuthexsController.php, line 92]
Warning (2): Illegal string offset ‘tmp_name’ [APP/Controller\AuthexsController.php, line 95]
Warning (2): Illegal string offset ‘name’ [APP/Controller\AuthexsController.php, line 95]
在数据库中,仅第一个字符正在存储并显示错误
感谢和问候, 达山