这是我的代码 bcmul 未定义但我担心 bcmul 是用于将两个任意精度数相乘的 php 函数。但是laravel显示未定义为什么?
public function confirmBtcRequest(Request $request,$id){
$getBalanceInfo = $this->bitcoin->get_balance();
$sendAmount = bcmul($getBalanceInfo->data->available_balance, '0.01', 8);
print_r($sendAmount);
die;
}
Run Code Online (Sandbox Code Playgroud)
如果您有任何想法,请回复我。
hkt*_*ang 13
根据 PHP 文档,Linux 服务器上的 PHP7 默认不提供 BCMath。
bcmath 不会在 linux(ubuntu 服务器)上使用 php 7 自动安装您必须使用:sudo apt-get install php-bcmath
请使用 apt-get 安装它: sudo apt-get install php-bcmath
来源:http : //php.net/manual/en/bc.installation.php
| 归档时间: |
|
| 查看次数: |
5231 次 |
| 最近记录: |