�� session.upload_progress.enabled INI ѡ���ʱ��PHP �ܹ���ÿһ���ļ��ϴ�ʱ����ϴ����ȡ� �����Ϣ���ϴ���������û��ʲô�����������ļ��ϴ�ʱӦ�ÿ��Է���һ��POST�����նˣ�����ͨ��XHR����������״̬
��һ���ϴ��ڴ����У�ͬʱPOSTһ����INI�����õ�session.upload_progress.nameͬ������ʱ���ϴ����ȿ�����$_SESSION�л�á� ��PHP������POST����ʱ��������$_SESSION�����һ������, ������ session.upload_progress.prefix �� session.upload_progress.name������һ���ֵ�� ͨ����Щ��ֵ����ͨ����ȡINI��������ã�����
<?php
$key = ini_get("session.upload_progress.prefix") . ini_get("session.upload-progress.name");
var_dump($_SESSION[$key]);
?>
ͨ����$_SESSION[$key]["cancel_upload"]����ΪTRUE
��������ȡ��һ�����ڴ����е��ļ��ϴ���
����ͬһ���������ϴ�����ļ���������ȡ����ǰ���ڴ�����ļ��ϴ���δ������ļ��ϴ������Dz����Ƴ���Щ�Ѿ���ɵ��ϴ���
��һ���ϴ�������ôȡ��ʱ��$_FILES�е�error���ᱻ����Ϊ
UPLOAD_ERR_EXTENSION
��
session.upload_progress.freq �� session.upload_progress.min_freq INIѡ��������ϴ�������ϢӦ�ö�ñ����¼���һ�Ρ� ͨ����������������ѡ���ֵ��������ܵĿ����������Ժ��Բ��ơ�
Example #1 ������Ϣ
һ���ϴ���������Ľṹ������
<form action="upload.php" method="POST" enctype="multipart/form-data"> <input type="hidden" name="<?php echo ini_get("session.upload_progress.name"); ?>" value="123" /> <input type="file" name="file1" /> <input type="file" name="file2" /> <input type="submit" /> </form>
��session�д�ŵ����ݿ���ȥ�������ӵģ�
<?php
$_SESSION["upload_progress_123"] = 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(
0 => array(
"field_name" => "file1", // Name of the <input/> field
// The following 3 elements equals those in $_FILES
"name" => "foo.avi",
"tmp_name" => "/tmp/phpxxxxxx",
"error" => 0,
"done" => true, // True when the POST handler has finished handling this file
"start_time" => 1234567890, // When this file has started to be processed
"bytes_processed" => 57343250, // Amount of bytes received and processed for this file
),
// An other file, not finished uploading, in the same request
1 => array(
"field_name" => "file2",
"name" => "bar.avi",
"tmp_name" => NULL,
"error" => 0,
"done" => false,
"start_time" => 1234567899,
"bytes_processed" => 54554,
),
)
);
Ϊ��ʹ�������������web����������������Ҫ���ã����� PHP���ܽ����ļ���ȫ�ϴ����ʱ�����յ��ļ��ϴ����� ��֪�Ỻ�����ִ�����ij�����Nginx��