krishnakumarkk
krishnakumarkk

Reputation: 19

codeigniter : unable to access image inside view folder

am using codeigniter 2.

when i use the below i cant get the image. 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

403 Forbidden

Forbidden

You don’t have permission to access /application/views/admin/images/image.png on this server.

am on local server wamp. if i put the image on root i can get it

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

Upvotes: 0

Views: 5626

Answers (2)

Kandur
Kandur

Reputation: 21

there may be .htaccess file in your root what deny write. Rename .htaccess and try again. if it works, you may edit .htaccess

Upvotes: 2

Daniel Greaves
Daniel Greaves

Reputation: 987

Only .php view files are supposed to exist within the /application/views directory. You should store images in a directory like /images or /assets in the web root.

Upvotes: 6

Related Questions