note 108691 added to session.upload-progress
| From: | Zeus | Date: | Thu, 17 May 2012 22:14:23 +0000 |
| Subject: | note 108691 added to session.upload-progress | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188046@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 76.201.100.232
----
Manual Page -- http://www.php.net/manual/en/session.upload-progress.php
Edit -- https://master.php.net/note/edit/108691
Del: integrated -- https://master.php.net/note/delete/108691/integrated
Del: useless -- https://master.php.net/note/delete/108691/useless
Del: bad code -- https://master.php.net/note/delete/108691/bad+code
Del: spam -- https://master.php.net/note/delete/108691/spam
Del: non-english -- https://master.php.net/note/delete/108691/non-english
Del: in docs -- https://master.php.net/note/delete/108691/in+docs
Del: other reasons-- https://master.php.net/note/delete/108691
Reject -- https://master.php.net/note/reject/108691
Search -- https://master.php.net/manage/user-notes.php