您好,欢迎访问一九零五行业门户网

wamp - PHP表单不同平台遇到的问题

写了一个关于猜数字的php程序,在mac上用mamp运行,接收不了表单$_post数据
但在windows上用camp运行就没问题,求教这是怎么回事?
这是代码:
$num_to_guess) { $message = $_post['guess']. is too big!; } elseif ($_post['guess']>$num_to_guess) { $message = $_post['guess']. is too small!; } else { $message = i am terribly confused.; }}file_put_contents(php://input);?> a php number guessing script type your guess here:
submit

回复内容: 写了一个关于猜数字的php程序,在mac上用mamp运行,接收不了表单$_post数据
但在windows上用camp运行就没问题,求教这是怎么回事?
这是代码:
$num_to_guess) { $message = $_post['guess']. is too big!; } elseif ($_post['guess']>$num_to_guess) { $message = $_post['guess']. is too small!; } else { $message = i am terribly confused.; }}file_put_contents(php://input);?> a php number guessing script type your guess here:
submit

1.前段用调试工具查看一下请求数据是否正确
2.php打印$_request,看看数据是否正确接收
其它类似信息

推荐信息