• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to generate domainless links or cache files

#5
[eluser]Colin Williams[/eluser]
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']);


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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