From: Julian F. <ju...@be...> - 2003-01-11 22:33:40
|
Thanks Ondrej, I applied a modified version of this patch and added you to the contributors list in doc/CREDITS. Julian Ondrej Jombik wrote: > Script documentation_page.php directly calls phpinfo() function, which > prints out the whole HTML page. Unfortunatelly page doctype, header and > similar elements was already sent by Mantis, so output final HTML page > containing twice <!DOCTYPE ...>, <head> is not valid and never will be. > > Patch in attachement fixes this by extracting the content of phpinfo() and > flushing to the page. > > -- > _/| Ondrej Jombik - ne...@ph... - http://www.nepto.sk - OJ812-RIPE > <_ \ Platon SDG - open source software development - http://platon.sk > `\| UNIX is user friendly. It's selective about who its friends are! > '` > > > ------------------------------------------------------------------------ > > --- /home/ondrej/prog/CVS-others/mantisbt/documentation_page.php Tue Sep 3 04:41:50 2002 > +++ documentation_page.php Tue Dec 31 16:00:14 2002 > @@ -17,6 +17,15 @@ > > <?php print_manage_doc_menu( 'documentation_page.php' ) ?> > <br /> > -<?php phpinfo() ?> > +<?php > + > +ob_start(); > +phpinfo(); > +$content = ob_get_contents(); > +ob_end_clean(); > +$content = preg_replace('|^.*<body>(.*)</body>.*$|si', '\\1', $content); > +echo $content; > + > +?> > > <?php print_page_bot1( __FILE__ ) ?> -- ju...@be... Beta4 Productions (http://www.beta4.com) |