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

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');
Reply


Messages In This Thread
RE: Hi guys, its my first day. And i dont know how to link an image using CI. - by mwhitney - 07-20-2016, 06:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB