I downloaded the PEAR Package HTML_BBCodeParser2 and tried it satisfactorily in easyPHP (LAMP) root folder.
I am using:
require_once('HTML/BBCodeParser2.php');
/* get options from the ini file */
$config = parse_ini_file('BBCodeParser2.ini', true);
$options = $config['HTML_BBCodeParser2'];
$parser = new HTML_BBCodeParser2($options);
Everything works fine and the BBCode gets parsed well. But if I transfer the 'HTML' folder containing BBCodeParser2.php to anyother folder and change the required path then it throws the following error:
Uncaught exception 'InvalidArgumentException' with message 'Failed to load filter Basic' in ........ ...... HTML_BBCodeParser2-0.1.0\B\HTML\BBCodeParser2.php on line 190
I do understand that line 188 to 190
in BBCodeParser2.php is:
@include_once 'HTML/BBCodeParser2/Filter/'.$filter.'.php';
if (!class_exists($class)) {
throw new InvalidArgumentException("Failed to load filter $filter");
I tried every path relative+absolute but, either the page throws the above error or just doesn't show anything.
My question is that, if I have to make new folder say B
and move the files in this what should I change at line 188
to be as I know that it's that line which throws the error.
Thank you in advance.
Do not mess with the paths in the files - it will prevent you from upgrading the lib to newer versions.
If you want to move the complete library to another directory, you need to adjust the include path as well.