代码和值正常的情况下php无法接收post数据,求解。
-
原创
-
2016-06-20 12:45:42
493浏览
login.php
if ($_GET['c']=='login'){
if (!empty($_POST['login_submit'])){
require 'PerClass/login.admin.php';
$u = $_POST['u'];
$p = md5($_POST['p'].LOGIN_PROTTY);
$v = $_POST['v'];
if ($v == $_SESSION['Verification.code']){
require_once 'PerClass/filter.admin.php';
LoginFun(FileTer($u), $p, $config);
}else {
echo <<
:(
验证码错误!!
end;
}
}
}
if ($_GET['c']=='forget'){
require 'PerClass/login.admin.php';
if (!empty($_POST['sub_email'])){
require_once 'int_mail.php';
}
}
login.admin.php
function LoginFun($u, $p, $config)
{
$new = new LoginCor($config);
$r = $new->LoginPer($u, $p);
if ($r) {
$_SESSION['user_login'] = md5($r['username'] . $r['password'] . LOGIN_PROTTY);
$_SESSION['nickname'] = $r['nickname'];
$_SESSION['id'] = $r['id'];
header("location:?c=index");
} else {
echo <<
:(
登陆失败!!
end;
}
return $r;
}
function SiteQuery($config)
{
$new = new LoginCor($config);
$r = $new->SiteQuery();
return $r;
}
function UserForget($user, $config)
{
$new = new LoginCor($config);
$r = $new->ForgetPass($user);
return $r;
}
回复讨论(解决方案)
入口处var_dump($_POST);
你确认 login.php 被执行到了吗?
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。