If _SERVER variable is not initialized, assume command line mode.
[htmlpurifier-web.git] / xhtml-compiler / common.php
blobf11d0a1d044bc6487d991d78febfa6c5c71ba5c9
1 <?php
3 if (!version_compare(PHP_VERSION, "5", ">=")) exit('Requires PHP 5.');
4 chdir('../'); // set working directory to parent directory (slightly hacky)
6 require_once 'htmlpurifier/HTMLPurifier.auto.php';
7 require_once 'functions.php';
9 require_once 'XHTMLCompiler.php';
10 require_once 'XHTMLCompiler/PHP.php';
11 require_once 'XHTMLCompiler/Exception.php';
13 require_once 'XHTMLCompiler/Page.php';
14 require_once 'XHTMLCompiler/File.php';
16 require_once 'XHTMLCompiler/Filter.php';
17 require_once 'XHTMLCompiler/FilterManager.php';
18 require_once 'XHTMLCompiler/TextFilter.php';
19 require_once 'XHTMLCompiler/DOMFilter.php';
21 set_exception_handler('xhtmlcompiler_exception_handler');
22 XHTMLCompiler::getInstance(); // invoke the super-object