CodeIgniter Forums

Full Version: Am i doing the right way to store images url?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
I used
Code:
$this->upload->data()
$data['full_path']
at first and it stored the file system path in my db which mean
Code:
C:/wamp/www/etc/etc
.........and i cannot retrieve image at
Code:
<img src="" />
using the above path.

After that, i change it to
Code:
$config['upload_path'] . $upload_data['file_name']
and retreive with
Code:
<img src="base_url() . $row-&gt;path" />

Can i actually do like this or any better solution?