php receives binary stream, php receives binary_PHP tutorial

WBOY
Release: 2016-07-13 09:44:28
Original
990 people have browsed it

php receives binary stream, php receives binary

/**Binary stream generated file
* $_POST cannot interpret binary stream, you need to use $GLOBALS['HTTP_RAW_POST_DATA'] or php://input
* Neither $GLOBALS['HTTP_RAW_POST_DATA'] nor php://input can be used Used for enctype=multipart/form-data
* @param String $file The file path to be generated
* @return boolean
*/
function binary_to_file($file){
$content = $GLOBALS[ 'HTTP_RAW_POST_DATA']; // php.ini settings are required
if(empty($content)){
$content = file_get_contents('php://input'); // php.ini settings are not required, Low memory pressure
}
);



http://www.bkjia.com/PHPjc/1048765.html

www.bkjia.com

http: //www.bkjia.com/PHPjc/1048765.htmlTechArticlephp receives binary stream, php receives binary/** Binary stream generated file* $_POST cannot interpret binary stream, required Use $GLOBALS['HTTP_RAW_POST_DATA'] or php://input * $GLOBALS['...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!