LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   php HTTP_RAW_POST_DATA no value in function (https://www.linuxquestions.org/questions/programming-9/php-http_raw_post_data-no-value-in-function-270685/)

dinges 12-27-2004 01:38 AM

php HTTP_RAW_POST_DATA no value in function
 
Hi,

When I use HTTP_RAW_POST_DATA in a function - called via a 'required' - I get an error ' undefined variable'. But when I use it in the main php file that is called by a client everything is OK.
usage:
Code:

        if (!empty($GLOBALS['HTTP_RAW_POST_DATA'])) {
                $req = $HTTP_RAW_POST_DATA;
                print $req . "\n";       
        }

What am I doing wrong?

Cedrik 12-27-2004 11:59 AM

Why not use : $req = $GLOBALS['HTTP_RAW_POST_DATA'];


All times are GMT -5. The time now is 03:01 PM.