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

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

#2
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 )
Reply

#3
(07-15-2018, 04: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.

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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