0

I don't want a google custom search to be shown on my development system which is on windows but it should be visible when on production system which is on Linux.

How do I check it?

This isn't working out. I've placed this code in the block "Pages on which this PHP code returns TRUE (experts only) " but it does not work in my Windows installation:

<?php
if(  file_exists("C:"))
{
return false;
}
return true
?>

1 Answer 1

2

You can achieve this by implementing the php_uname() function:

$os_name = php_uname("s");
if($os_name == 'Linux') {
  return TRUE;
}
//can apply additional checks for other OS
else {
  return FALSE;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.