Posted by paullefil on 12/17/61 11:56
I have 3 files on my website
tes1.php :
<?php
require_once("test2.php");
if ($_GET['redirige'] == 1)
{
@header( "Location: http://www.mydomain.com/test3.php" );
}
else
{
echo "it's test1.php";
}
?>
and test2.php (one file without php code !)
<?php
?>
and test3.php :
<?php
print "it's test3.php";
?>
Now if you load :
http://www.mydomain.com/test1.php
(it's written "it's test1.php")
Now if you load :
http://www.mydomain.com/test1.php?redirige=1
The result is a blank page but normally you will be redirect to
http://www.mydomain.com/test3.php with "it's test3.php" written.
Now in the test1.php file, you delete the ligne
require_once("test2.php");
So your test1.php file is :
<?php
if ($_GET['redirige'] == 1)
{
@header( "Location: http://www.mydomain.com/test3.php" );
}
else
{
echo "on affiche test1.php";
}
?>
Now if you load :
http://www.mydomain.com/test1.php
(it's written "it's test1.php")
Now if you load :
http://www.mydomain.com/test1.php?redirige=1
The result is a OK you are redirect to
http://www.mydomain.com/test3.php with "it's test3.phpp" written.
Could you help me, where is the bug ?
SBE
[Back to original message]
|