$_POST
, $_FILES
を使わないやつ
php -S 127.0.0.1:8080 -t ./ -c php.ini
enable_post_data_reading=Off |
<?php | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
$fp = fopen('php://input', 'r'); | |
$content = fread($fp, 1024); | |
fclose($fp); | |
var_dump($content); | |
} | |
?> | |
<form action="test.php" enctype="multipart/form-data" method="post"> | |
<input type="text" name="mytext" value="test text" /> | |
<input type="file" name="myfile" /> | |
<button type="submit">submit!</button> | |
</form> |