CodeIgniter Forums
i have my images outside the website in a /home/images and i cannot show them on the site - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: i have my images outside the website in a /home/images and i cannot show them on the site (/thread-57149.html)



i have my images outside the website in a /home/images and i cannot show them on the site - El Forum - 02-20-2013

[eluser]dinisptc[/eluser]
i have my images outside the website in a /home/customerfiles and i cannot show them on the site

/home/pedro/customerfiles/2/3/avatar/orkos.jpg

i am doing like this :

Code:
<img src="&lt;?php echo $images_thumb_dir.$project['avatar']; ?&gt;" title="" alt="avatar_&lt;?php echo $project['id']; ?&gt;" width="120" height="80"/>

and its not working


thanks
Pedro


i have my images outside the website in a /home/images and i cannot show them on the site - El Forum - 02-20-2013

[eluser]InsiteFX[/eluser]
Code:
&lt;?php echo base_url('path_to your_images'); ?&gt;



i have my images outside the website in a /home/images and i cannot show them on the site - El Forum - 02-20-2013

[eluser]CroNiX[/eluser]
Using base_url() won't work if his assets are outside of the site/document root.

And, you can't directly access assets via the URL that aren't in a web accessible space whether using codeigniter or pure HTML. So you'll have to move them within the site, or to a CDN or somewhere else that is web accessible instead of a private dir. Or you could define a directory alias in .htaccess or something as well.