Add PUT file handle test

This commit is contained in:
php-curl-class
2013-08-21 16:17:06 -07:00
parent ef3f5202c5
commit fdcb99c1e9
3 changed files with 31 additions and 0 deletions
+7
View File
@@ -23,6 +23,13 @@ else if ($test === 'post_file_path_upload') {
echo mime_content_type($_FILES[$key]['tmp_name']);
exit;
}
else if ($test === 'put_file_handle') {
$tmp_filename = tempnam('/tmp', 'php-curl-class.');
file_put_contents($tmp_filename, file_get_contents('php://input'));
echo mime_content_type($tmp_filename);
unlink($tmp_filename);
exit;
}
header('Content-Type: text/plain');