You are here: Bug or not bug « PHP Programming Language « IT news, forums, messages
Bug or not bug

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация