知行合一

享受过程 漠视结果

导航

php 查看当前页中的post及get数据

    file_put_contents("log1209.html",date('Y-m-d H:i:s ')."-----<br>",FILE_APPEND);
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        file_put_contents("log1209.html",date('Y-m-d H:i:s ')."#POST<br>",FILE_APPEND);
        foreach($_POST as $key=>$value)
            file_put_contents("log1209.html",date('Y-m-d H:i:s ').$key."=>".$value."<br>",FILE_APPEND);
    }
    else{
        file_put_contents("log1209.html",date('Y-m-d H:i:s ')."#GET<br>",FILE_APPEND);
        foreach($_GET as $key=>$value)
            file_put_contents("log1209.html",date('Y-m-d H:i:s ').$key."=>".$value."<br>",FILE_APPEND);
    }
    file_put_contents("log1209.html",date('Y-m-d H:i:s ')."+++++<br>",FILE_APPEND);

 

posted on 2014-12-09 16:44  项羽  阅读(636)  评论(0编辑  收藏  举报