Im new at CodeIgniter and I want to read some data from mysql database using CodeIgniter. Data I have stored is an image.
I have this folder structure in my aplication:
echo ' <img src=" http://localhost/ci/'.$row->book_img.' " />'
echo ' img(' http://localhost/ci/'.$row->book_img.')';
The uploads folder should be out side of application folder because the htaccess in the application folder blocks access
application system upload_images <-- folder permission 0777 index.php
then make sure you are getting the image correct on controller
On controller you might need to do this
$data['img'] = $row->book_img; $this->load->view('your_view', $data);
<img src="<?php echo base_url('upload_images/' . $img);?>;" />
And set your base url
$config['base_url'] = 'http://localhost/yourproject/';