1
PHP 5.4引入了一項新功能來跟蹤文件上傳。此功能是在PHP中找不到PHP Session upload_progress INI
$ _SESSION upload_progress。
我們必須通過php.ini啓用它。
雖然我無法在我的php.ini中找到任何地方來啓用此選項。有什麼問題?
我的php版本是5.4。
PHP 5.4引入了一項新功能來跟蹤文件上傳。此功能是在PHP中找不到PHP Session upload_progress INI
$ _SESSION upload_progress。
我們必須通過php.ini啓用它。
雖然我無法在我的php.ini中找到任何地方來啓用此選項。有什麼問題?
我的php版本是5.4。
您需要將這些參數添加到您的php.ini文件中。
session.upload_progress.enabled = on
session.upload_progress.prefix = "upload_progress_"
session.upload_progress.name = "blabla"
入住這<form>
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="<?php echo ini_get("session.upload_progress.name"); ?>" value="blabla" />
<input type="file" name="file1" />
<input type="file" name="file2" />
<input type="submit" />
</form>
,並在你的PHP ..
<?php
$_SESSION["upload_progress_blabla"] = array(
"start_time" => 1234567890, // The request time
"content_length" => 57343257, // POST content length
"bytes_processed" => 453489, // Amount of bytes received and processed
"done" => false, // true when the POST handler has finished, successfully or not
"files" => array(
這是信息的混合物,從PHP Manual取爲好。您需要查看認真。