Welcome Guest, Not a member yet? Register   Sign In
i have my images outside the website in a /home/images and i cannot show them on the site
#1

[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
#2

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

[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.




Theme © iAndrew 2016 - Forum software by © MyBB