• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
It works but is it the correct way?

"<?php echo site_url('uploads/'); echo $horse->picture; ?>">

Yes, and if you want do links see the User Guide on anchor
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(07-15-2018, 03:48 AM)dreamweaver Wrote: "<?php echo site_url('uploads/'); echo $horse->picture; ?>">

If you are trying to link to image or css file, it's better to use base_url() function.

site_url will include or exclude index.php, depending on your setup.

In my opinion, it's also better to add everything as function argument, not adding it to later.

<img src="<?php echo base_url('uploads/'.$horse->picture); ?>">

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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