[eluser]suppster[/eluser]
Hi, I am trying to include a codeigniter comments section within certain pages of an existing site. I am using the following to include the codeigniter snippit:
Code:
echo $directoryLevelPrefix . "staff/codeigniter/index.php";
$_SERVER["REQUEST_URI"] = "comment/index2/".$page;
require_once($directoryLevelPrefix . "staff/codeigniter/index.php");
This works fine normally, but when I put the code in a function and call it I get the following error:
Quote:Fatal error: Call to a member function item() on a non-object in \codeigniter\system\core\Utf8.php on line 47
I guess codeigniter must be taking some details from the calling page which are out of scope in the calling function. Any ideas how to do this?