laravel - Call to undefined function App\Http\Controllers\bcmul() in laravel 5.5
问题描述
Here is My code bcmul is undefined but my concern bcmul is php function using for Multiply two arbitrary precision numbers. but laravel show undefined why?
public function confirmBtcRequest(Request $request,$id){
$getBalanceInfo = $this->bitcoin->get_balance();
$sendAmount = bcmul($getBalanceInfo->data->available_balance, '0.01', 8);
print_r($sendAmount);
die;
}
if You have any idea please respond me.
解决方案
According to PHP documentation, BCMath is not available by default with PHP7 on Linux servers.
bcmath ist not installed automatically with php 7 on linux (ubuntu server) You have to use: sudo apt-get install php-bcmath
Please install it using apt-get: sudo apt-get install php-bcmath
推荐阅读
- django - 未创建对象
- mongodb - 大型数据库中与 $nin/$ne 查询相关的性能问题
- python - 如何更新 django 模板中 db 字段的值
- python - Python打印元素发生在下一个元素之后
- docker-compose - 管理员用户在 Rocketchat 中失败
- python - 除非我退出脚本,否则谷歌云操作卡在 RUNNING
- reactjs - 制表符 - 自定义单元格编辑器未完全打开
- python - 对 python 请求使用多个 CA 证书
- ios - SwiftUI 中的自定义 TabView 导航
- linux - OPENSSH - 密钥身份验证问题(权限被拒绝(公钥))