Loading Please wait...

File Upload
[Request Object Model.]

Collaboration diagram for File Upload:
This file is part of Zigmoyd PHP Framework. More...


Modules

 validation.
 This file is part of Zigmoyd PHP Framework.

Data Structures

class  zRom_upload
 Works as a container of File Upload. More...
class  upload

Detailed Description

This file is part of Zigmoyd PHP Framework.

Copyright (C) 2008 Neel Basu (Sunanda Bose)

Zigmoyd PHP Framework is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Zigmoyd PHP Framework is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Zigmoyd PHP Framework. If not, see <http://www.gnu.org/licenses/>.

By default Zigmoyd upload's everything on transfer/up Directory in your Project's directory.

Upload works more or less same as GET/POST requests and is very simple.First you should check wheather or the form has been submitted using $this->request->file->isSubmitted(), however you can also do this through $this->isUploadRequest().

Now Invoke doUpload() Method $this->request->file->doUpload() that does the Uploading job.It returns true/false depending upon success or failure.

$request->file is actually an Instance of zRom_upload Class.

You can simply code something like.

if($this->request->file->isSubmitted()){
  if($this->request->file->doUpload()){
    //Uploaded Successfully
  }else{
    //Problem while Uploading
  }
}else{
 //Form not yet Submitted
}
You can also invoke Validation Maps through $this->request->file->initValidator() method in the same way.

Generated on Mon Oct 27 23:52:56 2008 for zigmoyd.kdevelop by doxygen 1.5.6