diff options
author | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
---|---|---|
committer | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
commit | e917f9be8b05c81357c1c2c9730d5060685d644d (patch) | |
tree | b6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /user_guide/libraries/file_uploading.html | |
parent | 5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff) | |
parent | e1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff) |
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'user_guide/libraries/file_uploading.html')
-rw-r--r-- | user_guide/libraries/file_uploading.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 31041341f..254b2666a 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -145,15 +145,15 @@ folder:</p> <textarea class="textarea" style="width:100%" cols="50" rows="43"><?php class Upload extends Controller { - + function Upload() { parent::Controller(); $this->load->helper(array('form', 'url')); } - + function index() - { + { $this->load->view('upload_form', array('error' => ' ' )); } @@ -164,22 +164,22 @@ class Upload extends Controller { $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; - + $this->load->library('upload', $config); - + if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); - + $this->load->view('upload_form', $error); - } + } else { $data = array('upload_data' => $this->upload->data()); - + $this->load->view('upload_success', $data); } - } + } } ?></textarea> |