PHP dump $_REQUEST to file

后端 未结 4 1695
Happy的楠姐
Happy的楠姐 2021-02-02 08:20

I want to dump request variables to a file for debugging. How\'s this possible?

4条回答
  •  你的背包
    2021-02-02 08:49

    I think nowadays this method is easier and faster:

    $req_dump = print_r($_REQUEST, true);
    $fp = file_put_contents('request.log', $req_dump, FILE_APPEND);
    

提交回复
热议问题