Anti-Moronic Posted November 13, 2009 Share Posted November 13, 2009 I have a strange dilemma. I am building a simple template system (very very simple)... I am defining the title tag, keywords etc. in the body files and was wondering, is there any way of including this file first BEFORE the head, so I can use those variables in the head. Is there any way to do this? Basically, all I want to do is extract php variables from a file, not output the actual file. any help is greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/181424-can-you-include-file-without-outputting/ Share on other sites More sharing options...
Anti-Moronic Posted November 13, 2009 Author Share Posted November 13, 2009 ok, I'm trying to use output buffering but it just doesn't seem to be working: <?php ob_start(); echo 'hello'; ?> The above is still outputting immediately and I haven't even flushed. I'm using wamp and output buffering is turned on. Should this be happening? Link to comment https://forums.phpfreaks.com/topic/181424-can-you-include-file-without-outputting/#findComment-957047 Share on other sites More sharing options...
Mchl Posted November 13, 2009 Share Posted November 13, 2009 I think output buffer is flushed automatically when script ends. Link to comment https://forums.phpfreaks.com/topic/181424-can-you-include-file-without-outputting/#findComment-957134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.