Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter- The upload destination folder does not appear to be writable
    primarykey
    data
    text
    <p>When I am running on localhost, it is fine. After uploaded on server.one error thrown-i.e. The upload destination folder does not appear to be writable. This is my controller-</p> <pre><code>function do_upload() { $path = './uploads/'; chmod($path,0777); $config['upload_path'] = $path; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '1000'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $config['encrypt_name'] = TRUE; $this-&gt;load-&gt;library('upload', $config); if ( ! $this-&gt;upload-&gt;do_upload()) { $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors()); $this-&gt;load-&gt;view('upload_form', $error); } else { $this-&gt;load-&gt;library('form_validation'); $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data()); $pic_path= 'uploads/'.$data['upload_data']['file_name']; $this-&gt;form_validation-&gt;set_rules('txt_title','Title','trim|required|xss_clean'); $this-&gt;form_validation-&gt;set_rules('category', 'Select Category', 'callback_select_validate'); $this-&gt;form_validation-&gt;set_rules('description','Description','trim|required|xss_clean'); if($this-&gt;form_validation-&gt;run() == FALSE) { redirect('upload'); } else{ $title =mysql_real_escape_string(htmlentities($this-&gt;input-&gt;post('txt_title'))); $category = $this-&gt;input-&gt;post('category'); $description = mysql_real_escape_string(htmlentities($this-&gt;input-&gt;post('description'))); $this-&gt;load-&gt;model('user'); $suc_mesg=$this-&gt;user-&gt;insertPic($pic_path,$category,$title,$description); $this-&gt;load-&gt;view('upload_success', $suc_mesg); } } } </code></pre> <p>This is my view page-</p> <pre><code> &lt;?php echo $error; echo form_fieldset('Upload Category Pics'); echo form_open_multipart('upload/do_upload'); echo '&lt;/br&gt;'; echo form_label('Title','title'); echo '&lt;input type="text" size="30" name="txt_title" placeholder="Enter title to pic"/&gt;'; echo '&lt;/br&gt;&lt;/br&gt;'; echo form_label('Choose Category Pics', 'category'); $options = array( 'null' =&gt; '--Please Select--', 1 =&gt; 'Technology', 3 =&gt; 'Entertainment', 2 =&gt; 'Politics', 4 =&gt; 'Sports' ); echo form_dropdown('category', $options, 'category'); echo "&lt;br&gt;&lt;/br&gt;"; echo form_label('Description','description'); $data = array( 'name' =&gt; 'description', 'id' =&gt; 'description', 'placeholder' =&gt; 'Enter description', 'rows' =&gt; '5', 'cols' =&gt; '40', ); echo form_textarea($data); echo '&lt;/br&gt;&lt;/br&gt;'; echo form_label('Browse Pics','pics'); echo '&lt;input type="file" name="userfile" size="20" /&gt;'; echo "&lt;br&gt;&lt;/br&gt;"; echo '&lt;input type="submit" value="upload" /&gt;'; echo '&lt;/form&gt;'; echo form_fieldset_close(); ?&gt; </code></pre> <p>I'm unable to find my bug,where exactly am wrong. is there anybody ready to help me plz?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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