if ($HTTP_SERVER_VARS['HTTP_HOST'] == 'localhost') $domain = "http://".$HTTP_SERVER_VARS['HTTP_HOST']."/discoverbrazil.com"; else $domain = "http://".$HTTP_SERVER_VARS['HTTP_HOST'].""; include("$domain/conexao.php"); ?>
| $url = $HTTP_SERVER_VARS['REQUEST_URI']; $host = $HTTP_SERVER_VARS['HTTP_HOST']; function GetDirs($url,$host) { $urlArray = explode('/',$url); $total = count($urlArray); if ($host == 'localhost') $total = $total-3; else $total = $total-2; for ($i=0; $i < $total; $i++) $dir .= "../"; return $dir; } $diretorio = GetDirs($url,$host); include(''.$diretorio.'pacotes.php'); ?> |