SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: CMS not outputting all the html
-
Jul 8, 2009, 06:59 #1
- Join Date
- May 2003
- Posts
- 164
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
CMS not outputting all the html (could be a buffering problem- ob_start())
I have a custom framework for a client. When the webpage making use of the framework is rendered, only the header/top content shows.
This is psuedocode for how it works on a basic page.
PHP Code:ob_start();//I read that this could solve my problem
/*
*this function echo's and includes HTML head,meta and other
*content just afterthe <body> tag
*/
CMS->getHeader();
/*
*this function echo's some content based on an action.
*/
CMS->processAction($_GET['someAction']);
/*
*this function closes the main content wrapper and
*the <body>, <html> tags
*/
CMS->getFooter();
How can I solve this? place all content in a variable, then output it? Alot of code to change! (~shudder~)Last edited by tinonetic; Jul 8, 2009 at 07:35.
Elgg Customisation & Theme development
Modx Custom Development
PHP programming
-
Jul 8, 2009, 07:19 #2
- Join Date
- Mar 2007
- Location
- Germany
- Posts
- 428
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ob_end_flush() anywhere?
Read the docs before using anything "you've read somewhere"...
-
Jul 8, 2009, 07:30 #3
using output buffering is not the ideal way to create a web page.
also if you use ob_start() to capture the content then you must have a function to get the content from the buffer
after the CMS->getFooter()
add this:
$content = ob_get_clean();
echo $content;
-
Jul 8, 2009, 07:46 #4
- Join Date
- May 2003
- Posts
- 164
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Jul 8, 2009, 08:28 #5
- Join Date
- May 2003
- Posts
- 164
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks