【发布时间】:2013-03-10 06:37:22
【问题描述】:
用户在其计算机上使用以下JavaScript/Ajax 运行页面:
xmlhttp.open("POST", "ProcessRequest.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(encodeURIComponent("fname=Mr.&lname=tester"));
服务器端脚本 ProcessRequest.php 似乎无法访问变量。
例如
$_POST['fname']
给出以下错误:
注意:未定义的索引:fname
我做错了什么?我正在使用 WAMP 运行它。
【问题讨论】:
标签: php javascript ajax wamp