PHPBuilder - Spell Checking and URL Tricks



RSS Twitter
Articles Php Functions

Spell Checking and URL Tricks

by: Rasmus Lerdorf
|
July 30, 2000

I needed a simple little example that I could use to show how Apache's ForceType directive can be put to good use with PHP. I chose a URL-based spell checker since one of the newer features of PHP is built-in spell checking and I thought this would interest people as well. This is of course a rather useless example. You can do a lot of quite complex things with the concept presented here.
The ForceType directive just changes the MIME type of something to the given type, overriding all other settings for the resource it is applied to. Since it applies to a resource you have to also somehow define which resources it should apply to. I normally use a <Location> block, but <Directory> and <Files> are useful here as well. You should read through How Directory, Location and Files sections work in the Apache documentation to understand the difference between these three better. The big advantage of the <Location> directive is that it can be used in .htaccess files which is good for people who don't have access to change their server's configuration files.
To get an idea of what this does try this URL: http://www.lerdorf.on.ca/s/bogus.

1
|
2
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Rasmus Lerdorf

Comment:



Comment:

(Maximum characters: 1200). You have characters left.