Note that there are some explanatory texts on larger screens.

plurals
  1. POCI's upload class isnt working?
    text
    copied!<p>Of course by that I mean I'm doing something wrong with it. I posted a question before similar to this one and got some answers. Well based on those answers (I wasn't using CI's class now I am) I'm having a new problem. Any help would be appreciated.</p> <p>PHP</p> <pre><code> public function do_upload () { $scopeId = $this-&gt;input-&gt;get('id'); $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|pdf'; $config['max_size'] = '1000'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this-&gt;load-&gt;library('upload', $config); if ( ! $this-&gt;upload-&gt;do_upload()) { $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors()); echo 'error'; &lt;----- This is what is showing up // uploading failed. $error will holds the errors. } else { $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data()); // uploading successfull, now do your further actions redirect(site_url('discovery/scopeDetails?scID='.$scopeId.'')); } echo $error; } </code></pre> <p>HTML Form</p> <pre><code> &lt;div id="upload"&gt; &lt;?=form_open_multipart('discovery/do_upload');?&gt; &lt;input name="userfile" size="40" type="file" /&gt; &lt;input type="submit" value="Upload" /&gt; &lt;/div&gt; </code></pre> <p>With the form i usually would just use straight HTML but I tried doing EXACTLY what <a href="http://codeigniter.com/user_guide/libraries/file_uploading.html" rel="nofollow noreferrer">http://codeigniter.com/user_guide/libraries/file_uploading.html</a> told me to do.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload