Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- header('Content-Type: text/html; charset=utf-8');
- header('Accept-Ranges: bytes');
- $file_name = base64_decode( strtr($_POST["file_name"], '-_,', '+/=') );
- if ( $file_name !== "" )
- {
- $file_handle = fopen("/full/path/$file_name", "a+");
- $php_input_handle = fopen("php://input", "r");
- while ( $data_chunk = fread($php_input_handle, 4096) )
- {
- fwrite($file_handle, $data_chunk, strlen($data_chunk));
- }
- fclose($file_handle);
- fclose($php_input_handle);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment