PHP: Possible to automatically get all POSTed data?

后端 未结 8 1583
Happy的楠姐
Happy的楠姐 2020-11-28 05:20

Simple question: Is it possible to get all the data POSTed to a page, even if you don\'t know all the fields?

For example, I want to write a simple script that colle

相关标签:
8条回答
  • 2020-11-28 06:13

    To add to the others, var_export might be handy too:

    $email_text = var_export($_POST, true);
    
    0 讨论(0)
  • 2020-11-28 06:14

    You can retrieve all the keys of the $_POST array using array_keys(), then construct an email messages with the values of those keys.

    var_dump($_POST) will also dump information about all of the information in $_POST for you.

    0 讨论(0)
提交回复
热议问题