- A long long time ago to learn CodeIgniter notes, very casual, but all of their own records, I hope that the people who need help.
- This article uses word2013 to edit and publish
- Postbird | There I am, in the world more exciting!
- Postbird Personal website:http://www.ptbird.cn
File Upload
1, manually create a good upload directory
2, Controllers/user
?
3, views/user/fileaction.php
???? The form needs to emphasize the file upload
<! DOCTYPE html>
???? <meta charset= "Utf-8" >
???? <meta http-equiv= "x-ua-compatible" content= "Ie=edge" >
???? <title>file</title>
???? <link rel= "stylesheet" href= "" >
<body>
???? <form action= "<?php echo site_url (' user/upload ')?>" method= "post" enctype= "multipart/ Form-data ">
???????? <input type= "file" name= "Pic"/>
???????? <input type= "Submit" value= "Upload"/>
???? </form>
</body>
4, $this->upload->data ();
???? return information
CodeIgniter Getting Started learning note 11-File Upload