Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your destination path probably needs a trailing slash, try this:</p> <pre><code>$this-&gt;image_path = realpath(APPPATH . 'event_images/'); </code></pre> <p>Try playing with the path, from the manual:</p> <blockquote> <p><strong>upload_path</strong>: The path to the folder where the upload should be placed. The folder must be writable and the path can be absolute or relative.</p> </blockquote> <p>In general, <strong>never assume success</strong>.<br> You can also get the error messages after you run <code>do_upload()</code> like so:</p> <pre><code>$this-&gt;upload-&gt;display_errors(); </code></pre> <p>That should help you resolve the error, or at least figure out why CI isn't uploading the image.</p> <p>Other things to try:</p> <ul> <li>Try running <code>var_dump(is_dir($path))</code> on the upload path and see what php says.</li> <li>Try removing the use of <code>realpath()</code>.</li> <li>Try a <code>./path/like/this</code> as used in the example on the docs page.</li> </ul> <p><strong>Another note</strong>: You really shouldn't be uploading anything directly into your application or system directory, and any files there should not be accessible directly via http. It's common practice and probably wise to create a separate <code>/uploads</code> directory.</p> <p>If all else fails, have another read through the docs in case you missed something:<br> <a href="http://codeigniter.com/user_guide/libraries/file_uploading.html" rel="nofollow">http://codeigniter.com/user_guide/libraries/file_uploading.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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