当前位置:网站首页>解决PHP提示Warning: Division by zero in错误
解决PHP提示Warning: Division by zero in错误
2022-07-28 11:24:00 【历史老师-】
原因:division by zero 是"除数是0"导致的错误
1、解决方法、运行前判断 如果除数为0,则不要计算(推荐)
if ($divisor!= 0) {
$subTime = round($cutTime / $divisor);
}
2、使用@符号 屏蔽掉错误。
最好不要使用,使用@是非常糟糕的编程习惯,因为它不会使错误消失,它只是隐藏它们,并且它使调试变得更糟,因为我们无法看到我们的代码实际上有什么问题。
边栏推荐
- How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
- Hcip (configuration of GRE and mGRE and OSPF related knowledge)
- Specific functions of some multi parameter functions
- “蔚来杯“2022牛客暑期多校训练营2
- 15. User web layer services (III)
- Business visualization - make your flowchart'run'(4. Actual business scenario test)
- OSCache cache monitoring Refresh Tool
- Deployment and use of Minio distributed object storage
- Training mode and practice of digital applied talents in Colleges and Universities under the integration of industry and education
- What is WordPress
猜你喜欢

Hcip (configuration of GRE and mGRE and OSPF related knowledge)

直接插入排序与希尔排序

Lyscript get previous and next instructions
![[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials](/img/46/830b7703ae7cbfa6051137061560c2.png)
[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials

Today's sleep quality record 74 points

Yolov3 complete explanation - from the perspective of data coding

Play with poetry - appreciate the beauty of ancient poetry

An idea plug-in helps you transform dto, VO, Bo, Po, do gracefully

Training mode and practice of digital applied talents in Colleges and Universities under the integration of industry and education

Upgrading of computing power under the coordination of software and hardware, redefining productivity
随机推荐
Introduction to the usage of SAP ui5 image display control avatar trial version
Some knowledge concepts
2022.07.06 summer training personal qualifying (I)
多线程与高并发(三)—— 源码解析 AQS 原理
Lua middle__ index、__ Understanding of newindex, rawget and rawset
使用百度飞桨 EasyDL 完成垃圾分类
2022.07.12 summer training personal qualifying (VII)
[diary of supplementary questions] [2022 Niuke summer multi school 2] D-Link with game glitch
Network communication protocol classification and IP address
Use Baidu PaddlePaddle easydl to complete garbage classification
Service workers let the website dynamically load webp pictures
玩转诗词-领略古诗文之美
Code simplification
本地化、低时延、绿色低碳:阿里云正式启用福州数据中心
程序的存储态与运行态
Gecko competition 2.0 is new! Come and show your flexible operation skills!
Character function and string function (Part 1)
新手如何快速完成建站?来免费“试衣间”体验
The principle and use of the wrap file of tolua
如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然