在编写代码错误时,可能会出现警告和通知.我知道错误背后的想法.我想有一个警告是为了通知您可能导致错误的事情,但通知不一样吗?我想通知不是做正确事情的消息;)
When writing code errors, warnings and notices can occur. I know the idea behind errors. I suppose a warning is there to inform you about something that can cause an error, but isn't a notice exaclty the same? I suppose a notice is not a message of something doing right ;).
这让我有点困惑.谁能说出这两者之间的区别以及应如何处理这些消息.
It's just a bit confusing to me. Can anybody tell the difference between those two and the way these messages should be treated.
通知是一条咨询消息,意思是你可能不应该做你正在做的事情,但无论如何我会让你做"
A notice is an advisory message meaning "You probably shouldn't be doing what you're doing, but I'll let you do it anyway"
警告是一条消息,表示您做错了一些事情,很可能在未来导致错误,所以请修复它."
A warning is a message saying "You are doing something wrong and it is very likely to cause errors in the future, so please fix it."
通知和警告都不会停止您的脚本的执行,尽管我鼓励您认真对待它们并努力在您的应用中没有任何通知.
Both notices and warnings will not halt execution of your script, although I would encourage you to take them seriously and strive to have not even one notice in your apps.
这篇关于通知和警告之间的 PHP 区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
MySQLi准备好的语句&foreach 循环MySQLi prepared statement amp; foreach loop(MySQLi准备好的语句amp;foreach 循环)
mysqli_insert_id() 是从整个服务器还是从同一用户获Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是从整个服务器还是从同一用户获取记录?)
PHP MySQLi 无法识别登录信息PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 无法识别登录信息)
mysqli_select_db() 需要 2 个参数mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 个参数)
Php mysql pdo 查询:用查询结果填充变量Php mysql pdo query: fill up variable with query result(Php mysql pdo 查询:用查询结果填充变量)
MySQLI 28000/1045 用户“root"@“localhost"的访问MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用户“root@“localhost的访问被拒绝)