Drunken
August 6th, 2003, 05:02 AM
heya!
For a long time I have many problems with function Header in PHP. This cause an error of outup buffering when we have something like this:
<?php
echo "Hi world!";
header ("location: main.php");
?>
this cause a error that i refer previous. The first solution for this was using javascript like this:
echo "<SCRIPT>window.location=\"main.php\"; </SCRIPT>";
but this isn't very good because when user click back on browser isn't possible, this function not permit Back.
Then I have to found another solution :m: , finally :geek:
like this:
<?php
ob_start();
echo "Hi world!";
header ("location: main.php");
ob_end_flush();
?>
Using this functions (ob_start(); and ob_end_flush(); ), we can have many outputing to buffer without cause error :)
You can found more information about this functions in
www.php.net (http://www.php.net)
I test this in PHP 4.0.6 and 4.3.1
I hope this help someone :azn:
xauz!
For a long time I have many problems with function Header in PHP. This cause an error of outup buffering when we have something like this:
<?php
echo "Hi world!";
header ("location: main.php");
?>
this cause a error that i refer previous. The first solution for this was using javascript like this:
echo "<SCRIPT>window.location=\"main.php\"; </SCRIPT>";
but this isn't very good because when user click back on browser isn't possible, this function not permit Back.
Then I have to found another solution :m: , finally :geek:
like this:
<?php
ob_start();
echo "Hi world!";
header ("location: main.php");
ob_end_flush();
?>
Using this functions (ob_start(); and ob_end_flush(); ), we can have many outputing to buffer without cause error :)
You can found more information about this functions in
www.php.net (http://www.php.net)
I test this in PHP 4.0.6 and 4.3.1
I hope this help someone :azn:
xauz!