当前位置:网站首页>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 .
边栏推荐
- Recursive method to realize the insertion operation in binary search tree
- Huawei Hrbrid interface and VLAN division based on IP
- golang mqtt/stomp/nats/amqp
- 黄金价格走势k线图如何看?
- In the era of industrial Internet, we will achieve enough development by relying on large industrial categories
- Leetcode1961. Check whether the string is an array prefix
- A Cooperative Approach to Particle Swarm Optimization
- Hcip---ipv6 experiment
- CocoaPods could not find compatible versions for pod 'Firebase/CoreOnly'
- FFT 学习笔记(自认为详细)
猜你喜欢

一圖看懂!為什麼學校教了你Coding但還是不會的原因...

Mobilenet series (5): use pytorch to build mobilenetv3 and learn and train based on migration

File upload vulnerability test based on DVWA

Differences between standard library functions and operators

VSphere implements virtual machine migration

ThreeDPoseTracker项目解析

VMware Tools安装报错:无法自动安装VSock驱动程序
![Cf:d. insert a progression [about the insert in the array + the nature of absolute value + greedy top-down]](/img/9e/c933f454a39d906a407e4d415f0b87.png)
Cf:d. insert a progression [about the insert in the array + the nature of absolute value + greedy top-down]

Unity | two ways to realize facial drive

3D model format summary
随机推荐
MYSQL---查询成绩为前5名的学生
ubantu 查看cudnn和cuda的版本
servlet(1)
Unity | 实现面部驱动的两种方式
Leetcode 208. Implement trie (prefix tree)
A picture to understand! Why did the school teach you coding but still not
Some features of ECMAScript
Cf:h. maximum and [bit operation practice + K operations + maximum and]
Electrical data | IEEE118 (including wind and solar energy)
After 95, the CV engineer posted the payroll and made up this. It's really fragrant
CocoaPods could not find compatible versions for pod 'Firebase/CoreOnly'
Nmap: network detection tool and security / port scanner
Development trend of Ali Taobao fine sorting model
File upload vulnerability test based on DVWA
Obstacle detection
Who knows how to modify the data type accuracy of the columns in the database table of Damon
Zhuhai's waste gas treatment scheme was exposed
Condition and AQS principle
GNSS terminology
Gartner发布2022-2023年八大网络安全趋势预测,零信任是起点,法规覆盖更广