gpt4 book ai didi

laravel - 在 laravel 5.5 中调用未定义的函数 App\Http\Controllers\bcmul()

转载 作者:行者123 更新时间:2023-12-02 04:07:02 26 4
gpt4 key购买 nike

这是我的代码 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;
}

如果您有任何想法请回复我。

最佳答案

根据 PHP 文档,默认情况下,BCMath 在 Linux 服务器上的 PHP7 中不可用。

bcmath ist not installed automatically with php 7 on linux (ubuntu server) You have to use: sudo apt-get install php-bcmath

请使用 apt-get 安装它:sudo apt-get install php-bcmath

来源:http://php.net/manual/en/bc.installation.php

关于laravel - 在 laravel 5.5 中调用未定义的函数 App\Http\Controllers\bcmul(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53412599/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com