Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CakePHP 不保存我提供的文件路径。该记录有 3 列(id、路径、描述),但每次我尝试添加路径时,“路径”列都是空的。
$this->UpdateFile->saveAll($this->request->data)
这些文件是动态生成的,因此它们的结构如下:
data[UpdateFile][n][path] data[UpdateFile][n][description]
如何保存路径?
$this->request->data['UpdateFile']['path'] = $this->request->data['UpdateFile']['n']['path']; $this->UpdateFile->saveAll($this->request->data);
当输入字段设置为 'disabled="disabled"' 时,浏览器不会传输这些值。我已经删除了这个属性并且它起作用了。