php - function rightshift($num, $bits) is not working in server -


function rightshift($num, $bits) {  return bcdiv($num, bcpow('2', $bits));  }  echo rightshift(1024,8)); 

in php working in local system not working in server.

i'm guessing local system windows, server linux?

the windows build of php has built-in support, while linux builds need compiled option. see http://www.php.net/manual/en/bc.installation.php. doesn't seem enabled default.

how enable depend on hosting provider. if have full access server, recompile php flag set , you'll fine. here's page targeted @ dreamhost, guides should apply server environment you're allowed install own php: http://wiki.dreamhost.com/bcmath


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -