December 2001
Intermediate to advanced
520 pages
13h 42m
English
Every programmer is constantly on the lookout for a better way to minimize errors and problems in their scripts. Unfortunately, most programmers learn debugging through sheer trial and error—and lots of it. Here are some tips for debugging your scripts:
View the HTML source when a problem happens. Some browsers—for example, Netscape Navigator—will show a blank page even when a PHP error occurs toward the end of a page. Viewing the source may be the only way to see what the issue is.
Use a text editor that checks for balanced parentheses, braces, tags, quotation marks, and more.
Use reverse testing when logical errors occur. Reverse testing is the method of switching your conditionals. For example,
if ($variable = 5) { ...
may not seem ...
Read now
Unlock full access