I checked this answer on Solution to multi server environment with a CodeIgniter website
Happens that testing it with a simple echo like this
if(strpos($_SERVER['HTTP_HOST'], 'mylivesite.com'))
{
define('LIVE', TRUE);
echo "LIVE";
}
else
{
define('LIVE', FALSE);
echo "NOT LIVE";
}
Won’t work. Always says its NOT LIVE.
But this way.
if($_SERVER['HTTP_HOST'] === 'mylivesite.com')
{
define('LIVE', TRUE);
echo "LIVE";
}
else
{
define('LIVE', FALSE);
echo "NOT LIVE";
}
Says its live when on remote server.
What would be the problem?
Would be any problem to do with ===’mylivesite.com’?
Will make it work as expected.