2014-04-11 11:59
浏览 97

在php INI中找不到PHP Session upload_progress

PHP 5.4 introduce a new feature to track file upload. this feature is

$_SESSION upload_progress.

We have to enable it via php.ini.

Though I can't find any place in my php.ini to enable this option. What's the problem?

My php version is 5.4.

图片转代码服务由CSDN问答提供 功能建议

PHP 5.4引入了一项新功能来跟踪文件上传。 此功能

$ _ SESSION upload_progress。


虽然我在php.ini中找不到任何地方来启用此选项。 有什么问题?


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doutu1889 2014-04-11 12:18

    You need to add these params to your php.ini file.

    session.upload_progress.enabled = on
    session.upload_progress.prefix = "upload_progress_" = "blabla"

    Check this <form>

    <form action="upload.php" method="POST" enctype="multipart/form-data">
     <input type="hidden" name="<?php echo ini_get(""); ?>" value="blabla" />
     <input type="file" name="file1" />
     <input type="file" name="file2" />
     <input type="submit" />

    and on your 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(

    This is a mixture of information and taken from PHP Manual as well. You need to check out that seriously.

    点赞 打赏 评论

相关推荐 更多相似问题