• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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');

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.