Skip to content

Instantly share code, notes, and snippets.

@marcinwol
marcinwol / example-upload.phpt
Created January 23, 2011 05:47
Example phpt file for testing file uploads
--TEST--
Example test emulating a file upload
--SKIPIF--
<?php if (php_sapi_name()=='cli') die('skip'); ?>
--POST_RAW--
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryfywL8UCjFtqUBTQn
------WebKitFormBoundaryfywL8UCjFtqUBTQn
Content-Disposition: form-data; name="file"; filename="example.txt"
Content-Type: text/plain