当前位置:网站首页>PHP error what is an error?
PHP error what is an error?
2022-07-06 01:21:00 【Lu Gangwei Beijing ideal International Travel Service Co., Ltd】
There are two kinds of mistakes :
- There is an error message
- No error message
Common error causes
Running environment error
There are many such problems , such as :
- Multiple development environments are installed at the same time (xampp/wamp/phpstudy..)
- Insufficient authority ( Run without administrator privileges )
- Wrong configuration modification (httpd.conf php.ini etc. )
- PHP Version of the problem ( Suggest php5.6+)
- The alternative PHP Code editor (dw/hbuilder)
- ..
Wrong operation
Such mistakes are relatively elementary , such as :
- Direct double click PHP file function
- Wrong URL entered
- File suffix error
- …
Such mistakes , Most of them didn't watch the video carefully , Or skip class . If such problems occur frequently , And at a loss , Then don't learn programming .
Code error
Newcomers often meet Grammar mistakes , Such problems are easy to solve ,PHP The error prompt of is very accurate , And the code editor also has a warning color .
Because of the common problems of carelessness :
- Missing space 、 Line breaking semicolon
- quotes 、 Brackets are not paired
- Magic method lacks underline
- Letter case
- Misspelled words
- ....
Common problems caused by unskilled grammar :
- Array related syntax
- Class and object related syntax
- session/cookie
- Database query and SQL Statement writing
Although the code is executed in sequence , But don't ignore some grammar :
- if{} The statements in are conditionally executed
- for/while The code in is executed repeatedly
- foreach The number of cycles is related to the number of array keys
- function , Called to execute
- Class method , Such as through “ object ” To carry out .
- ....
Coding errors , The garbled problem caused by :
- File encoding error
- HTML meta Label usage error
- SQL Before query , No, SET NAMES UTF8
- Database encoding error
All in all , Grammatical errors are an entry-level problem , An error is a warning : It means that you don't have a solid grasp of the knowledge points here .
AD: Little buddy in the Laboratory , Can pass this stage relatively quickly .
Business error
If one day , Your program rarely makes grammatical errors , It's about business 、 Logical errors related to requirements , So congratulations , You have advanced .
Server error
- linux ( File name case / System permissions )
- …
Is it because I'm stupid that I made mistakes ?
Mistakes will always be with you , Even if you are an international bull . Different stages , There will be different mistakes .
Eliminating mistakes depends on a solid foundation 、 Enough code 、 Rich development experience . therefore , You often make some “ Daniel ” It seems that the mistake of a weak chicken , It's not because you're stupid , But because of the different stages you are in .
How to eliminate errors ?
decompose
Put a demand 、 A piece of code , Break it down into several steps , Is the key to solving the problem !
For example, registered users :
- Custom forms
- input data
- Submit data
- Check the data
- According to the verification results , Save or prompt error
First, it is decomposed into such steps , Then analyze the step where the problem occurs .
边栏推荐
- Kotlin basics 1
- Vulhub vulnerability recurrence 75_ XStream
- ThreeDPoseTracker项目解析
- VSphere implements virtual machine migration
- China Taiwan strategy - Chapter 8: digital marketing assisted by China Taiwan
- 037 PHP login, registration, message, personal Center Design
- Blue Bridge Cup embedded stm32g431 - the real topic and code of the eighth provincial competition
- 基於DVWA的文件上傳漏洞測試
- IP storage and query in MySQL
- Electrical data | IEEE118 (including wind and solar energy)
猜你喜欢

现货白银的一般操作方法

一图看懂!为什么学校教了你Coding但还是不会的原因...

WordPress collection plug-in automatically collects fake original free plug-ins

Condition and AQS principle

Questions about database: (5) query the barcode, location and reader number of each book in the inventory table

3D model format summary

DOM introduction
![[pat (basic level) practice] - [simple mathematics] 1062 simplest fraction](/img/b4/3d46a33fa780e5fb32bbfe5ab26a7f.jpg)
[pat (basic level) practice] - [simple mathematics] 1062 simplest fraction

MATLB | real time opportunity constrained decision making and its application in power system

3D模型格式汇总
随机推荐
Threedposetracker project resolution
037 PHP login, registration, message, personal Center Design
Remember that a version of @nestjs/typeorm^8.1.4 cannot be obtained Env option problem
ThreeDPoseTracker项目解析
Idea sets the default line break for global newly created files
Code Review关注点
Leetcode sword finger offer 59 - ii Maximum value of queue
282. Stone consolidation (interval DP)
internship:项目代码所涉及陌生注解及其作用
ubantu 查看cudnn和cuda的版本
普通人下场全球贸易,新一轮结构性机会浮出水面
A glimpse of spir-v
Huawei Hrbrid interface and VLAN division based on IP
ORA-00030
File upload vulnerability test based on DVWA
JVM_ 15_ Concepts related to garbage collection
A Cooperative Approach to Particle Swarm Optimization
测试/开发程序员的成长路线,全局思考问题的问题......
Unity | 实现面部驱动的两种方式
Basic process and testing idea of interface automation