可以通过协议php:// fd /?读取上传的文件。PHP通过php读取上传的文件:// fd/
例如:
<?php
echo file_get_contents('php://fd/1'); // I quess file descriptor (1) is the name of file input ?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="1"/>
<input type="submit" value="ok"/>
</form>
我可以使用“php://输入” 因为我需要获取文件中的明文“something”。 我可以使用char'\ 0'来操纵结果,但是php:// fd /会是我最简单的方法.. – l00k
我想你要找的是[$ _FILES](http://php.net/manual/ en/reserved.variables.files.php) - [也是这个](http://www.php.net/manual/en/features.file-upload.post-method.php) – Ben
:)我知道如何上传文件。 我只是想知道这种情况 – l00k