Installation
From PhpInputValidator
Contents |
Step 1:
Download the most current version of phpInputValidator.
Step 2:
Upload the files to your webserver.
Only what is contained in the lib directory is required to run, so you could create a folder on your webserver called phpInputValidator and upload everything from the lib directory into that directory
Step 3:
Link to the file phpInputValidator.php.
A absolute path is best.
An example:
Step 4:
Configure your instance. See Configuration Or make a default instance.
Step 5:
Use it!
My suggestion would be to assign the class to a global variable and use it that way.
However you can directly access the instance:
Optional:
You must download and install HTMLPurifier from http://htmlpurifier.org/ if you want to take in HTML input at all. This library allows you to strip unsafe HTML as well as cleanup bad HTML. Downloading and installing this library is the only way to use the HTML plugin. If you do not then you cannot take in HTML as it will be stripped automatically from strings.