note 108691 deleted from session.upload-progress by danbrown

From: Date: Thu, 17 May 2012 22:17:41 +0000
Subject: note 108691 deleted from session.upload-progress by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-188048@lists.php.net to get a copy of this message
Note Submitter: Zeus ---- The line <?php $key = ini_get("session.upload_progress.prefix") . ini_get("session.upload-progress.name"); ?> is very incorrect. The value of $_POST[ini_get("session.upload-progress.name")] is what gets appended to ini_get("session.upload_progress.prefix") to determine the index of $_SESSION. Therefore the following code will get the information, but only on the request that is uploading the file. <?php $key = ini_get("session.upload_progress.prefix") . $_POST[ini_get("session.upload-progress.name")]; ?> If you want to get the information on a different request, such as for creating an AJAX progress bar, you'll have to use some other method to determine the value of $_POST[ini_get("session.upload-progress.name")]. For example, save it to a separate session variable, or just use a static value.

« previous php.notes (#188048) next »