Jump to content

Need Advanced Help with BBCode


gaza165

Recommended Posts

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

 

filesystem1.jpg

 

then inisde the PEAR folder i have

 

filesystem2.jpg

 

then inside the HTML folder i have

 

filesystem3.jpg

 

if anyone out there has a clue on waht im sayiong i would be grateful thanks.

 

Garry

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.