I have tried this and it's working perfectly ..
<?php
function conn()
{
$ora_con=0;
//development connection building
if ( $_SERVER['SERVER_NAME'] == 'xyz.com' )
{$username='scott';
$password = 'tiger';
$ora_conn_string = 'conn_name:port_no/db_name';
//echo "<br>development connection building";
$ora_con = oci_connect($username,$password,$ora_conn_string);
//echo '<br>dev connection build<br>';
}
//Production connection building
elseif ( $_SERVER['SERVER_NAME'] == 'abc.net' )
{$username='prod_scott';
$password = 'prod_tiger';
$ora_conn_string = 'conn_name:port_no/db_name';
//echo "<br>Production connection building";
$ora_con = oci_connect($username,$password,$ora_conn_string);
//echo '<br>Prod connection build<br>';
}
return $ora_con;
}
?>
$domain
?$host
when you are on that domain?