Answer the question
In order to leave comments, you need to log in
Apache/PHP how to get data sent in POST?
Now I'm working on a RESTfull service, I'm sending POST data - they are registered in environment variables like $_SERVER[ 'HTTP_<VARIABLE_NAME>' ] , while the $_POST array is empty. Can you please tell me how it can be corrected to receive data via $_POST ?
Answer the question
In order to leave comments, you need to log in
php.net/manual/en/wrappers.php.php
can be read from php://input
like file_get_contents("php://input")
or else it can be in $HTTP_RAW_POST_DATA
Does your service send or receive data? It's not clear from the question.
As $_SERVER['HTTP_<VARIABLE_NAME>'] data is usually logged which is passed as HTTP headers. Maybe you're sending data to your service incorrectly?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question