News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
File uploads with Zend_Form_Element_File
December 01, 2008 @ 09:30:46

With the recent released of the 1.7 version of the Zend Framework Rob Allen wanted to post about a new form element type that integrates some much needed functionality - Zen_Form_Element_File.

Now that Zend Framework 1.7 has been released, I thought I'd take a look at the built in file upload element, Zend_Form_Element_File, and see how it can be used. This is how to use it in its most basic form.

The form in this example is similar to his previous example and the simple code is included for the form, the controller and the view.

That's all there is to it for simple uploading of forms. There are still a few fairly important bugs in the component that we'll have to wait for 1.7.2 for. Specifically the Count validator doesn't always work as you'd expect and don't use getValues() and receive() as it isn't yet clever enough to know not to call move_uploaded_file() more than once.
0 comments voice your opinion now!
file upload tutorial zendframework zendformelementfile


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Zend Framework 1.0.0 RC1 released

Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces

Kevin Schroeder's Blog: ZendCon 2010 Podcast - Introducing Zend Framework 2.0

JellyandCustard.com: Regular Expressions in PHP

PHPMaster.com: Where on Earth are You?


Community Events





Don't see your event here?
Let us know!


introduction series wordpress developer release bugfix community project code application api threedevsandamaybe laravel library interview language framework configure podcast list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework