Welcome Guest, Not a member yet? Register   Sign In
How to generate domainless links or cache files
#6

[eluser]Jamie Rumbelow[/eluser]
[quote author="Colin Williams" date="1263746846"]Your first two lines, Jamie, repeat what the browser already does when it encounters paths prefixed with a "/"

That last bit is pretty useful though, since it works out subfolders.

Code:
$config['base_url'] = '/'. str_replace(basename($_SERVER['SCRIPT_NAME']),'',$_SERVER['SCRIPT_NAME']);
[/quote]

I like having the full URL available (for example, when sending a validation email), and all this means is that I can have the full URL and not worry about it. Still, each man to his own.

Jamie


Messages In This Thread
How to generate domainless links or cache files - by El Forum - 01-16-2010, 12:56 PM
How to generate domainless links or cache files - by El Forum - 01-16-2010, 04:20 PM
How to generate domainless links or cache files - by El Forum - 01-16-2010, 10:32 PM
How to generate domainless links or cache files - by El Forum - 01-17-2010, 03:02 AM
How to generate domainless links or cache files - by El Forum - 01-17-2010, 04:47 AM
How to generate domainless links or cache files - by El Forum - 01-17-2010, 04:50 AM
How to generate domainless links or cache files - by El Forum - 01-17-2010, 04:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB