top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to upload a file in Cake PHP?

0 votes
168 views
How to upload a file in Cake PHP?
posted Jul 23, 2014 by Karamjeet Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

For uploading a file in cake php,you need to use type as file while generating the form.Along with this,add a field of Form with input type as file.
Example:
$this->Form->create('User',array('type'=>'file')); // equiv. to (enctype=multipart/form-data)
$this->Form->input('FILE',array('type'=>'file'));

Using this,you can easily your upload your file in cakePHP.

answer Jul 24, 2014 by Mohit Sharma
...