[php] ´ë¿ë·® post ÆÄÀÏ Ã³¸®
-- php.ini ------------------
file_uploads = On
upload_max_filesize = 300M
post_max_size = 350M
max_execution_time = 30
max_input_time = 60
memory_limit = 512M ;; // not work in script file
-----------------------------
-----------------------------
$tofile = 'foobar.data';
$fp = fopen('php://input','r'); // HTTP/POST raw data
while(!feof($fp))
{
$buf = fread($fp,1048576);
file_put_contents($tofile,$buf,FILE_APPEND);
}
fclose($fp);
-----------------------------
or
-----------------------------
$tofile = 'foobar.data';
$src = fopen('php://input','r'); // HTTP/POST raw data
$dst = fopen($tofile,'w');
stream_copy_to_stream($src,$dst);
fclose($dst);
fclose($src);
-----------------------------
|