0

我最近唯一改变的是将 register_globals 关闭

这是登录脚本的结尾:

$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 回答