Browsers are notorious for rendering HTML pages perfectly even when a page contains errors. For instance, a button may display properly but not function because of a missing closing tag. Hence the need for tools to check syntax. This is relatively straightforward for static HTML pages but what about dynamic pages? When server-side technologies such as PHP or ASP are used to create HTML pages dynamically, checking and debugging the result can be difficult. This article will show how this can be done using the free text editor, HTML-Kit. This will involve configuring some of the features of this editor. No knowledge of any specific technologies is required but a general knowledge of HTML and of the function of browsers and web servers is assumed.
Using HTML-Kit to Debug Server-Side Scripts (Page 1 of 4 )
I do not intend to repeat anything covered in my introductory article on HTML-Kit except to note a few features that directly relate to the current discussion. What I intend to do here is explain some of the ways this application may be used to simplify the writing, validation and debugging of server-side scripts. If you need to download and install HTML-Kit please see the instructions at http://www.chami.com/htmlkit/.
To check your server-side scripts -- and it is always good practice to check them locally before uploading them -- you need a server. Since HTML-Kit only runs under Windows you will most likely be using Personal Web Server (PWS) or Internet Information Server (IIS). All versions of Windows after Windows 95, except ME, support running these web servers locally. If you are adventurous and have installed Apache Web Server under Windows, this will also work and you should be able to follow along, making the appropriate changes.
Naturally enough, all versions of PWS and IIS support server-side scripting using ASP but, as mentioned above, what's detailed here applies to any server-side script supported by your server.