PHP File upload - memory handling on CGI

后端 未结 1 1459
离开以前
离开以前 2021-01-24 18:04

I\'m wondering how PHP handles a file upload. I\'v read a file upload will be split in chunks and will be assembled after the upload has finished. Is there any verification of t

1条回答
  •  一整个雨季
    2021-01-24 18:15

    PHP does read the file in chunks but it doesn't write them to individual files and then recombine them, it keeps writing them to the same temporary file which is the one you get in $_FILES.

    It's the same for mod_php and CGI.

    Here's the responsible code: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/main/rfc1867.c?revision=307583&view=markup#l1065

    0 讨论(0)
提交回复
热议问题