Output buffering not rendering php content -


i have template controller. in controller load appropriate template require_once this:

ob_start(); $userinfo = $user->userdetails($_session["userid"]); require_once('/templates/1/file1.php'); $output = ob_get_clean(); 

file1.php (the file being "required" in template controller) needs access $userinfo however, not. doing wrong output buffer?

i think issue require_once failing because path template file incorrect.

it should like:

require_once($_server['document_root'] . '/templates/1/file1.php'); 

or

require_once($global_template_path . '/templates/1/file1.php'); 

where $global_template_path /home/yoursite/app/module


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -