Welcome Guest, Not a member yet? Register   Sign In
Codeigniter within existing site
#1

[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?


Messages In This Thread
Codeigniter within existing site - by El Forum - 04-18-2011, 12:57 PM
Codeigniter within existing site - by El Forum - 04-18-2011, 11:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB