Welcome Guest, Not a member yet? Register   Sign In
unable to access image inside view
#1

[eluser]Unknown[/eluser]
am using codeigniter 2.

when i use the below i cant get the image.
<img src="&lt;?php echo base_url();?&gt;application/views/admin/images/image.png">
folder structure is correct.but the image is not coming there.from view
source option i got the following

&lt;html&gt;&lt;head>
&lt;title&gt;403 Forbidden&lt;/title&gt;
&lt;/head&gt;&lt;body>
<h1>Forbidden</h1>
<p>You don't have permission to access /application/views/admin/images/image.png
on this server.</p>
&lt;/body&gt;&lt;/html>

am on local server wamp.
if i put the image on root i can get it
<img src="&lt;?php echo base_url();?&gt;image.png">

but i was uing similar folder structures with codeigniter 1.7.3 those were working for me
i dont know why its not with ci2 or i mde any mistake.....
#2

[eluser]oldmatt[/eluser]
Are you sure your path is correct in the config settings?
#3

[eluser]InsiteFX[/eluser]
Add to .htacces file:
Code:
RewriteCond $1 !^(index\.php|favicon\.ico|images|css|js)
RewriteRule ^(.*)$ ./index.php?/$1 [L]

InsiteFX
#4

[eluser]oldmatt[/eluser]
Oh, yeah, that could be the cause too.




Theme © iAndrew 2016 - Forum software by © MyBB