What is the meaning of 'var_export($_REQUEST, true)' in PHP
Can anybody please tell me what this means开发者_如何学C in PHP?
var_export($_REQUEST, true)
It converts $_REQUEST
to a string, which would evaluate to the array, then returns it.
See the documentation of var_export
.
Actually, your code tries to execute var_export(Array, true)
in a shell as you have backticks around it (even though you most likely just accidentally put them when posting the line as code here on SO).
But without the backticks, your code exports $_REQUEST
to PHP code which could be used to re-create an array with the same data.
Edit: Aww, now they have been edited away.
Try
var_export($_REQUEST['true'])
Returns true to the client, if the operation was successful.
Otherwise you can send any message.
精彩评论