Hi, I'm Using ZendFramework-1.0.4 and I don't have any idea how does it wrap the $_FILE global-variable. Is it a good idea to use it directly in my Controller? Bcus I need to Upload an image file.
Hi,
I suppose you can use $_FILES
as you whish.
Still, the best way to be sure is to use something like
var_dump($_FILES);
somewhere in you controller ; this way, you'll see if it contains what you expect ;-)
Then, don't forget to use is_uploaded_file
; and, you can use move_uploaded_file
to manipulate the file.
Still, if you are using forms, you could take a look at Zend_Form
and Zend_Form_Element_File
, which will do some work for you.
Hu... Actually : not sure those were present in ZF 1.0.x :-(
As a sidenote : Zend Framework 1.0.4 is quote old (was released in frebruary 2008 ; see the archives page) ; it is no longer maintained, and there have been several versions released since. Would it not be useful for you to update ?
(Would probably require some work, though, for such an update, as lots of things have changed... But there are many components that have been added, and could be useful for your project, too ;-) )
If anyone else still use this version.
I recommend you use the HTTP_Upload class from the sweet PEAR library.
hi can anyone tell me how to migrate zend framwork from 1.0.x to 1.10 ?. Please try to reply asap