Ok, now I also included the code below on each page, and every time I change the next piece of code too every time I put it on a new web page. Is there a way that I can include all this code once and affect it on every web page and how the code works?
Here is a piece of code that I have to change all the time.
require './htmlpurifier/library/HTMLPurifier.auto.php';
require '../htmlpurifier/library/HTMLPurifier.auto.php';
require '../../htmlpurifier/library/HTMLPurifier.auto.php';
require '../../../htmlpurifier/library/HTMLPurifier.auto.php';
Here is the code.
require './htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.Encoding', 'UTF-8');
$config->set('HTML.Doctype', 'XHTML 1.0 Strict');
$config->set('HTML.TidyLevel', 'heavy');
$config->set('HTML.SafeObject', true);
$config->set('HTML.SafeEmbed', true);
$purifier = new HTMLPurifier($config);
source
share