seems to be a good option housebolt, but im getting this error:
Fatal error: Call to undefined function vendors() in W:\www\cake\app
\controllers\cars_controller.php on line 81

do i have to change some setting before i cna use the vendors
function? thanks

On Aug 2, 9:01 am, housebolt <[EMAIL PROTECTED]> wrote:
> PEAR has one of the easiest uploaders to use:
>
> http://pear.php.net/package/HTTP_Upload
>
> drop the file into your vendors folder, and then follow this:
>
> In your view:
> -----------------------------------------------------
> <?php echo $html->form('/wherever/', 'POST',
> array('enctype'=>'multipart/form-data')); ?>
> <input type="file" name="userfile" />
> </form>
>
> In your controller:
> -----------------------------------------------------
> vendors('HTTP_Upload');
>
> $upload = new HTTP_Upload("en");
> $file = $upload->getFiles("userfile");
>
> if ($file->isValid()) {
>     $moved = $file->moveTo("uploads/");
>     if (!PEAR::isError($moved)) {
>         $this->flash("File was moved to uploads/", '/wherever/');
>         exit;
>     }
>
> }
>
> also google "Pear HTTP_Upload" for a bunch of different tutorials.
>
> rtanz wrote:
> > hi i need a simple file upload function, basically the users would be
> > filling in a form and have to upload two files in the form. I dont
> > need anything fancy just the facility to specify the location of the
> > file and then the files get uploaded on submitting the form. When they
> > view the form they should see a link to the uploaded file.
>
> > is there some built in cake facility to do this or should i be looking
> > at other solutions? thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to