1
下面的代码返回“文件‘’无法读取或不存在”总是:Zend的文件验证器返回错误信息
$filters = array(
'*' => 'stringTrim'
);
$validators = array(
'image'=> array(
'allowEmpty' => TRUE,
new Zend_Validate_File_ImageSize(array('minheight'=>0,'minwidth'=>0,'maxheight'=>1024,'maxwidth'=>1024)),
)
);
$input = new Zend_Filter_Input($filters, $validators);
$input->setData(array_merge($data, $_FILES));
if (!$input->isValid()) {
$this->_errors = $input->getMessages();
}
TNX,工作。 $ files ['image'] = $ _FILES ['image'] ['tmp_name'];并使用$文件insteade $ _FILES – 2011-04-04 07:43:41
现在返回允许的最大宽度图像“”应该是“94”,但“128”检测。它应该是图像'图像'的最大允许宽度应该是'94',但是'128'被检测到 – 2011-04-04 07:49:03
不确定这个,可能是一个错误。如果是这样,请将其报告给ZF开发团队。 – Htbaa 2011-04-04 07:58:45