Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

danimohamadnejad's avatar

Php session is clear for progressive upload.

<?php
session_start(); 
 if($_SERVER['REQUEST_METHOD']=='POST'){ 
   print_r($_SESSION);  
 }
?>
<!DOCTYPE html>
<html>
    <head></head>
    <body>
     <div class="min">
     <form action="<?php echo $_SERVER['PHP_SELF']?>" 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="submit" />
</form>
     </div>
    </body>
</html>

Hi I am trying to manage progressive upload in php. I am using power of upload_progress in php but it does not seem to work since I must get upload progress information in $_SESSION but it's empty array. Could any body help me with solving this problem? After submitting form progressive upload info should be in $_SESSION but it's empty array. Thank you in advance.

0 likes
0 replies

Please or to participate in this conversation.