note 27227 added to ref.domxml

From: Date: Thu, 28 Nov 2002 03:41:10 +0000
Subject: note 27227 added to ref.domxml
Groups: php.notes 
Request: Send a blank email to php-notes+get-40060@lists.php.net to get a copy of this message
Couple of features of PHP probably at work. If the JavaScript object that you are sending sends a Content Type header that is recognized by PHP (probably "text/xml") it's default behavior (believe it or not) is to parse the XML doc into name/value pairs. The easiest way around this is to change the default behavior in php.ini with the setting "always_load_http_raw_post_data" (it's something to that effect). You can then reference $HTTP_RAW_POST_DATA which is not broken into name/value pairs. If the setting is not set in php.ini, the only time that PHP will set the raw post array is if the content type is set to something with which it is not familiar (e.g., "text/weirdstuff"). After reading in the XML doc, you can easily use the domxml or regular SAX functions to operate on it. Hope this helps, Mike -- http://www.php.net/manual/en/ref.domxml.php http://master.php.net/manage/user-notes.php?action=edit+27227 http://master.php.net/manage/user-notes.php?action=delete+27227 http://master.php.net/manage/user-notes.php?action=reject+27227

« previous php.notes (#40060) next »