代码跟值正常的情况下php无法接收post数据,求解

WBOY
Release: 2016-06-13 12:26:40
Original
732 people have browsed it

代码和值正常的情况下php无法接收post数据,求解。
html代码


            
            
        
        

            
            
            
            

            

            
            
            代码跟值正常的情况下php无法接收post数据,求解
        

    
    

    
    

    



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?c=login" method="POST">
依据什么会执行 login.php ???
------解决思路----------------------
请确认请求的页面是否存在。
action="admin?c=login" 
------解决思路----------------------
先确定是否有访问到admin?c=login

可以在admin?c=login文中加入
file_put_contents('sos.txt',json_encode($_REQUEST), true);
?>

看看sos.txt有没有内容。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!