This article describes the following, PHP implementation to receive binary code, and converted into a picture of an example, there is a need for a friend reference. PHP Development Flash Online crop images generated by the program, through the flash POST image of the binary data to PHP, generated by the PHP image saved. It is not possible to receive data with $_post, PHP only recognizes the application/x-www.form-urlencoded standard data type by default. Therefore, the type such as text/xml or soap or application/octet-stream content can not be resolved, if the $_post array to receive will fail! So keep the prototype and give it to $globals[' Http_raw_post_data ') to receive it. In addition, Php://input can also implement this feature. Php://input allows the raw data to be read from the POST. Compared to $HTTP _raw_post_data, it brings less pressure to memory and does not require any special php.ini settings. Php://input and $HTTP _raw_post_data cannot be used for enctype= "Multipart/form-data". Use Jpgencoder in Flash to turn bitmapdata into binary, then post to PHP code. 1,php page Code
2, the application in the thinkphp;
|