当我尝试将图像保存到目录时,它不会保存到我的文件夹中。有人可以给我一些指示吗?
protected function processForm(sfWebRequest $request, sfForm $form)
{
$formPost=$request->getParameter('planbook');
if(!$planbook=Doctrine::getTable('Planbook')->find($formPost['id'])){
$planbook= new Planbook();
}
$planbook->fromArray($formPost);
$this->form->getObject()->getPhoto();
$planbook->save();
//$this->redirect('@planbook_view='.$planbook->getid());
$form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
//if ($form->isValid())
//{
$planbook = $form->save();
$this->form->getValue('photo')->save(sfConfig::get('sf_upload_web_dir'));
//$this->redirect('planbook/edit?id='.$planbook->getId());
//$request->getFiles($this->form->getName());
}