3 Ways To Selectively Execute HTML Files Using Apache HTTP Server
A very simple way to execute HTML files is by telling the server to parse html files for SSI commands. To do it simply add the following lines to your .htaccess file:
AddType text/html .html
AddHandler server-parsed .html
This has the downside of processing all the html files in that directory and its subdirectories. A better way is to mark the files you want to execute with execute bit set and then add the line to your .htaccess file:
XBitHack on
XBitHack tells Apache to parse files for SSI directives if they have the execute bit set. So, to add SSI directives to an existing page, rather than having to change the file name, you would just need to make the file executable using chmod.
chmod +x pagename.html
There is a third and even simpler way to execute programs and display the results using AJAX. You can use any popular AJAX framework like Sajax or Prototype to make calls to the server and then display the results dynamically. This had the added advantage of being able to repeatedly update page contents.
Note: Flash and Java applets are two other alternatives. However they are less used these days.
Filed under Headline News, How To, Open Source Software, PHP, Tech Note, Technology, Web, Web Hosting, Web Services |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |




































March 6th, 2007 at 10:56 pm
hello
plz send the way of running the HTML(steps)
thanks
Antu Jain