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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -