Welcome Guest, Not a member yet? Register   Sign In
Use base_url for all internal links?
#6

[eluser]LuckyFella73[/eluser]
@ GeXus

Quote:I disagree, using base_url() makes it impossible to work without rewriting the URL, which is be very convenient for developing and testing or special case scenarios.

Thats a good point I have never thought about (though I should have Wink ).
In this manner this would be right:

Code:
<?php echo base_url();?>assets/img/img.jpg
<?php echo site_url();?>controller/method

Like Tomcode said: basically both are working but in case you can't use mod_rewrite
for any reason you would have to change all base_url()s pointing to a controller/method.


Messages In This Thread
Use base_url for all internal links? - by El Forum - 08-01-2011, 03:24 PM
Use base_url for all internal links? - by El Forum - 08-01-2011, 03:57 PM
Use base_url for all internal links? - by El Forum - 08-01-2011, 05:58 PM
Use base_url for all internal links? - by El Forum - 08-01-2011, 06:08 PM
Use base_url for all internal links? - by El Forum - 08-01-2011, 06:29 PM
Use base_url for all internal links? - by El Forum - 08-02-2011, 02:25 AM
Use base_url for all internal links? - by El Forum - 08-02-2011, 07:41 AM
Use base_url for all internal links? - by El Forum - 08-02-2011, 08:25 AM
Use base_url for all internal links? - by El Forum - 08-02-2011, 08:27 AM
Use base_url for all internal links? - by El Forum - 08-02-2011, 08:46 AM
Use base_url for all internal links? - by El Forum - 08-02-2011, 03:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB