用过zend_form的进来,帮忙解决一下有关问题

WBOY
Release: 2016-06-13 13:50:38
Original
703 people have browsed it

用过zend_form的进来,帮忙解决一下问题
最近才学习zend framework框架,在用 zend_form 的时候遇到一点问题。

  在用他创建表单的时候,我用了 zend_form_element_file 这个组件。但是我在用setMultiFile 设置多文件上传的时候,我不能把每个上传的文件都用 rename 重命名,要么,就是只命名了最后一个,要么, 所有文件都只是用一个名字。
  
  希望各位高手看到了。麻烦指点一下

------解决方案--------------------
foreach ($fileInfo as $key=>$name) {
$renameArr[] =array('source'=>$name['tmp_name'],'target'=>$fullpath.'/'.$newname);
}
$upload->addFilter(new Zend_Filter_File_Rename($renameArr));

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!