Add warning on chdir.
[xhtml-compiler.git] / common.php
blob596241e72495af64f2450daa5973cf609f93fca4
1 <?php
3 if (!version_compare(PHP_VERSION, "5", ">=")) exit('Requires PHP 5.');
5 // set working directory to parent directory (slightly hacky)
6 // if we want this to be able to be included in other apps,
7 // this must be removed
8 chdir( dirname(__FILE__) . '/../');
10 require_once 'htmlpurifier/HTMLPurifier.auto.php';
11 require_once 'functions.php';
13 require_once 'XHTMLCompiler.php';
14 require_once 'XHTMLCompiler/PHP.php';
15 require_once 'XHTMLCompiler/Exception.php';
17 require_once 'XHTMLCompiler/Page.php';
18 require_once 'XHTMLCompiler/File.php';
19 require_once 'XHTMLCompiler/Directory.php';
21 require_once 'XHTMLCompiler/RSSFeed.php';
23 require_once 'XHTMLCompiler/Filter.php';
24 require_once 'XHTMLCompiler/FilterManager.php';
25 require_once 'XHTMLCompiler/TextFilter.php';
26 require_once 'XHTMLCompiler/DOMFilter.php';
28 set_exception_handler('xhtmlcompiler_exception_handler');
29 XHTMLCompiler::getInstance(); // invoke the super-object