zoe Thu Apr 23 12:40:33 2009 UTC
Added files:
/phpruntests/phpt-tests sample_postraw.phpt
Log:
sample post_raw test
http://cvs.php.net/viewvc.cgi/phpruntests/phpt-tests/sample_postraw.phpt?view=markup&rev=1.1
Index: phpruntests/phpt-tests/sample_postraw.phpt
+++ phpruntests/phpt-tests/sample_postraw.phpt
--TEST--
Sample post_raw test
--POST_RAW--
Content-type: multipart/form-data, boundary=AaB03x
--AaB03x
content-disposition: form-data; name="field1"
Hello World
--AaB03x
content-disposition: form-data; name="pics"; filename="file1.txt"
Content-Type: text/plain
abcdef123456789
--AaB03x--
--FILE--
<?php
var_dump($_POST);
var_dump($_FILES);
var_dump(file_get_contents($_FILES["pics"]["tmp_name"]));
?>
--EXPECTF--
array(1) {
["field1"]=>
string(11) "Hello World"
}
array(1) {
["pics"]=>
array(5) {
["name"]=>
string(9) "file1.txt"
["type"]=>
string(10) "text/plain"
["tmp_name"]=>
string(14) "%s"
["error"]=>
int(0)
["size"]=>
int(15)
}
}
string(15) "abcdef123456789"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php