PDA

View Full Version : How to chech errors of html or php in Dream Weaver CS3


Sonnynima
12-24-2008, 08:11 AM
I press F10 to check my code errors but when I have both php code and html in one program I cannot debug it... any ideas on how to do that? The only way I check my errors is by actually running the program and getting pars errors !

:roll:

davidj
12-24-2008, 09:41 AM
learn the colour syntax for the language. This is a great way and can help identify most common mistakes like typos

Check all braces balance using the balancing tool (code view : left tool bar)

you will never get a true validation tool

its the shite part of programming but a necessary part of the learning process

TIPS:

Try to keep your PHP and HTML separate with PHP script being coded above the <html.

Ideally adopt an OOP approach to your coding. This keeps PHP and HTML relatively separate and allows you to reuse PHP in other applications and sites.

PHP error handling is second to non. Read the output as its very accurate.

Sonnynima
12-24-2008, 11:58 PM
That was kind of you to take the time to explain details of debugging.
I will do as you recommended.
In the past I used CSE validator for html programs which does a great job... but for php, I still haven't found a validator that checks for ; or { } or other syntax errors etc.
if you know of any such tool please let me know and in the mean time I try to eyeball the code as best as I can.
Sonny