Hi,
I'm wondering if someone can help me with a problem. I'm using a "portal" for my website. The guy who made the script is not sure what my problem is Im having so I thought I would ask the pro's here. I know very little about .php, but Im learning as I go. The script for my message board "portal" uses a portal.php file. In the administration of my board it also added options to change boxes, add boxes etc. I have a calendar script that is .php and I would like to put it on a blank "box" I can create for the potal index page. The script has an option to create a html box, or a "php" box. I tried to use an include tag in the box
<?php include "path/to/cal.php"; ?>
and it wont work. I did however get it to work using an "iframe" tag, but I dont like the way it looks. When I do choose "php" box, I get this error:
Parse error: parse error in /home/httpd/vhosts/mywebsite.com/httpdocs/messageboard/sources/Portal.php(362) : eval()'d code on line 1
Here is the snip of code from potal.php if this will help you :
PHP box
#
//----------------------------------------------------------
*/
function phpbox($box)
{
$content="";
$content.=$this->html->box_header($box['title']);
$phpcode=stripslashes($box['content']);
$phpcode=preg_replace("!(<\?php|<\?|\?>$)!im","",$phpcode);
ob_start();
eval($phpcode);
$result=ob_get_contents();
ob_end_clean();
$content.=$this->html->box($result);
$content.=$this->html->box_foot();
return $content;
}
/*
//----------------------------------------------------------
#
BOX FUNCTIONEN ENDE
Does anyone know how I can fix this error? Or how I can get the "include tag to work ?"
I like the look of the website, and have fixed a few other "bugs" the script had, but I'm kinda stupid when it comes to .php coding. I just cant seem to get it.
Thank You