0

最近変更したのは、register_globals を off にすることだけです

ログインスクリプトの最後は次のとおりです。

$from = $_POST['from']; //convert form element to var
//echo "got here, from is $from"; die; 

// test to prove $from is empty
if($from == '')
{ 
    $from = '/pages/reg2.html'; 
}
header("Location: $from"); // this should redirect page
4

1 に答える 1

0

このコードを試してみてください

<?php

if (isset($_POST['from']) && !empty($_POST['from'])) { 
$from = $_POST['from']; //convert form element to var
//echo "got here, from is $from"; die; 

 // test to prove $from is empty
}

if(empty($from))

{ 
    $from = '/pages/reg2.html'; 
}

//if still doesnt work try to replace this line with : echo $from; exit(); 
//just for you to know at what point you are .
header("Location: $from");
exit();




?>
于 2012-04-16T04:00:52.293 に答える