0
양식을 내 양식에서 해당 테이블의 올바른 필드로 매핑하는 데 문제가있어 현재 데이터베이스에 삽입 할 때 빈 필드 만 표시됩니다. 팝업 오류는 없지만 케이크를 어디에 넣어야하는지 알 수 없습니다.Formhelper를 사용하지 않고 Dropbox Chooser에서 POST 값 가져 오기 Cakephp
<?php
class UserfilesController extends AppController {
public function index(){
$this->set('userfiles', $this->Userfile->find('all'));
}
public function latest() {
if (empty($this->request->params['requested'])) {
throw new ForbiddenException();
}
return $this->Userfile->find('all', array('order' => 'Userfile.created DESC', 'limit' => 10));
}
public function add() {
if ($this->request->is('post')) {
$this->Userfile->create();
if ($this->Userfile->save($this->request)) {
$this->render('/homes');
} else {
$this->Session->setFlash(__('Something went wrong!'));
}
}
}
/*public function add() {
if ($this->request->is('post')) {
print_r($this->request);
}
}*/
}
폼에서 db 링크 저장. 여전히 db (thumbnail, bytes, etc ...)에서 전달 된 나머지 데이터를 저장할 수는 없지만 적어도 지금은 작동하지 않을 항목이 있습니다. 감사! – Nerdia