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
Post a Comment