question:
I try to buffer the output of the 'system/views/main.php' into $contents.
and then do a print.
Problem is that the contents of the system/views/main.php are printed 2
times.
Someone who can explain me?
following the contents of testfile.php and main.php, php.ini settings
concerning ob_ ... functions and the output of the script.

Thanks in advance,

Kevin Wood
http://www.dasdan.be

<?php
//  testfile.php
ob_start();
    include 'system/views/main.php';
$contents = ob_get_contents();

print 'no output above normally ??? :(';
print $contents;
?>

<?php
// file  :system/views/main.php

print <<<P1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html>
<head>
     <title>The Task List</title>
</head>
<body>
    <div>
    <h3>test</h3>
    <p>
</body>
</html>
P1;
?>

php.ini settings
....
output_buffering = Off
output_handler =
zlib.output_compression = Off
implicit_flush = Off
....


the output :


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html>
<head>
<title>The Task List</title>
</head>
<body>
<div>
<h3>test</h3>
<p>

</body>
</html>no output above normally ??? :(<!DOCTYPE HTML PUBLIC "-//W3C//DTD
XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html>
<head>
<title>The Task List</title>
</head>
<body>
<div>
<h3>test</h3>
<p>

</body>
</html>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to