Low cost ecommerce web development India flash website design
Logic Errors
Logic errors occur when an application runs perfectly as far as the PHP engine
is concerned, but the code does something other than what you had intended.
For example, imagine you have a mailing script that you want to use to send the
same message to a few of the members of your online forum. To your horror, you
discover upon executing the script that you've mailed the entire forum membership
… twenty times!
These kinds of problems are the most difficult to find; users of Windows XP will
be well acquainted with Windows updates—even big companies struggle with
logic errors.
Critical to finding logic errors is your ability to test rigorously your code in a safe
environment that's separate from your “live” Web server. Thankfully, PHP and
related technologies like Apache and MySQL (if you're using them) are cross
platform, which makes putting together an effective development environment
easy even if the underlying operating systems are different.
You should also investigate unit testing, a facet of Extreme Programming (XP),
to which you'll find an introduction in Volume II, Chapter 6. I've also suggested
further reading at the end of this chapter.
In Chapter 10, I'll be taking a look at strategies for handling errors themselves,
particularly environment errors. In particular, we'll discuss how you can record
(or trap) errors for your analysis without displaying ugly messages to your applications
users.
website designer freelance ASP PHP ecommerce web developer
1
2
3
4
5
6
7
8
9
10
11
12
13
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110