Welcome Guest, Not a member yet? Register   Sign In
Two base_url possible?
#9

[eluser]John_Betong[/eluser]
 
There are numerous solutions to the different paths problem between http://localhost and the online version.

The way I do it is to have this define in my index.php and change the paths wherever required.


Code:
// index.php
define('LOCALHOST', file_exists('c:') );

// config.php
if (LOCALHOST) {
   $config['base_url']    = "http://localhost/" ;
}else{
   $config['base_url']    = "http://sitename.com/" ;
}
 
 
 


Messages In This Thread
Two base_url possible? - by El Forum - 10-11-2007, 08:13 AM
Two base_url possible? - by El Forum - 10-11-2007, 08:25 AM
Two base_url possible? - by El Forum - 10-11-2007, 08:33 AM
Two base_url possible? - by El Forum - 10-11-2007, 10:16 AM
Two base_url possible? - by El Forum - 10-11-2007, 10:23 AM
Two base_url possible? - by El Forum - 10-25-2007, 07:19 AM
Two base_url possible? - by El Forum - 10-25-2007, 07:28 AM
Two base_url possible? - by El Forum - 10-25-2007, 07:43 AM
Two base_url possible? - by El Forum - 10-25-2007, 08:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB