一个月前,我的会话没有保留我自己的网页之间的值,所以通过更改文件类型从UTF-8到UTF8-没有BOM我的问题解决了。 现在我正在使用银行网络服务,我成功地调用了它的方法。通过发布表单将我的网页重定向到银行页面,付款后重定向到我的网站,我的会话数组为空!为什么我的会话在重定向后不工作?
我的会议不保留其价值......为什么?
之前重定向(process1.php):
<?php
session_start(); // first line and without space
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("form").submit();
});
</script>
</head>
<body>
<?php
$_SESSION['price']=1000;
$_SESSION['username']="14276912";
$_SESSION['password']="874593a";
$_SESSION['ReturnURL']="www.mysite.com/process3.php";
$params=array(//parameters);
$client=new SoapClient("https://bankname.com/MerchantUtility.asmx?wsdl");
$result=$client->__soapCall('bpPayRequest', array($params));
$RefId=$result[0];
?>
<form method="post" action="https://bankname.com/pgwchannel/startpay">
<input name="RefId" value="<?php echo $RefId?>" type="hidden"/>
</form>
</body>
</html>
从重定向页面复出(process2.php)后:
<?php
session_start(); // first line and without space
var_dump($_SESSION);
?>
的var_dump显示阵列(0){} 我很困惑。
你提交到其他页面? –
是我从** process2.php **将表格发布到银行的gatway,所以process2.php重定向到银行的付款页面。在银行方面的付款操作之后,银行将结果发布到我的** process3.php **并重定向到它。 – Javid