Welcome Guest, Not a member yet? Register   Sign In
Hi guys, its my first day. And i dont know how to link an image using CI.

Hello, i am using codeigniter for first time and i am trying to use any images, but i think there is a problem with folder permissions or something because links seems to be ok, but when i try to open the web page there are not images.

Could anyone help me a little to start with codeigniter?

Generally, I'll put all images, CSS, JavaScript, etc. in a series of sub-folders under my public directory (/public/assets/images/, /public/assets/css/, etc.), then use site_url('assets/images/imagename.jpg') or base_url() . 'assets/images/imagename.jpg' in my img element's src attribute. You could also use the HTML helper's img() function: echo img('assets/images/imagename.jpg');

Theme © iAndrew 2016 - Forum software by © MyBB