gaza165 Posted October 25, 2008 Share Posted October 25, 2008 I am trying to use BBCodes... I have installed PEAR and BBCodes onto my server, but i am having trouble including the files from the root of the server. <?php $str = "[url]fdsfdsfdsfds[/url]"; include_once "./init.inc.php"; require_once 'PEAR/HTML/BBCodeParser.php'; $options = @parse_ini_file('BBCodeParser.ini'); $parser = new HTML_BBCodeParser($options); echo $parser->qParse(htmlspecialchars($_POST['text'])); ?> this is the include file, this is doing something to the INI path, not 100% sure what its doing.. init.inc.php <?php // figure out the if ":" or ";" should be used for ini separators if (strpos(strtoupper(PHP_OS), "WIN") !== false) { define("INI_PATH_SEPARATOR", ";"); } else { define("INI_PATH_SEPARATOR", ":"); } // stripslashes as shown on http://php.net/get_magic_quotes_gpc if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); } ?> Warning: require_once(HTML/BBCodeParser.php) [function.require-once]: failed to open stream: No such file or directory in /home/thedesig/public_html/blog_files/blogmore.php on line 111 Fatal error: require_once() [function.require]: Failed opening required 'HTML/BBCodeParser.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:') in /home/thedesig/public_html/blog_files/blogmore.php on line 111 the root of my server is this like below php www then inside the php folder i have then inisde the PEAR folder i have then inside the HTML folder i have if anyone out there has a clue on waht im sayiong i would be grateful thanks. Garry Link to comment https://forums.phpfreaks.com/topic/130088-need-advanced-help-with-bbcode/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.