RE: [PHP] how to know upload progress status
| From: | John Holmes | Date: | Fri, 12 Jul 2002 02:33:47 +0000 |
| Subject: | RE: [PHP] how to know upload progress status | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107303@lists.php.net to get a copy of this message | ||
Not possible with HTTP, as far as I know. The file is simply sent,
there's no communication back and forth.
---John Holmes...
> -----Original Message-----
> From: S. [mailto:php@rivadossi.org]
> Sent: Thursday, July 11, 2002 2:45 AM
> To: php-general@lists.php.net
> Subject: [PHP] how to know upload progress status
>
> Hello,
> I'm beginning to use PHP, maybe my question is very simple...
> Anyway, I want permit users to upload files using a form, and I would
show
> them the upload progress status...
> I don't know how to extract informations about upload progress status
and
> how
> to show informations to users. For example I want the users can see
30% of
> upload completed, or the MByte just uploaded.
>
>
> I had some difficulties to write to the list, so I send the mail (with
> some
> modifies in the address) several times;
> I apologyze if many mails are sended to the list.
>
>
>
> Thanks for help...!
> S.
>
>
>
>
>
> In th file "fileupload.php" I call a function named "uploadfile" as
shown
> in
> the follow code:
>
>
>
>
>
>
> uploadfile($g_dir_corrente);
>
>
>
>
>
> if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name']))
> {
> $nomefile=$HTTP_POST_FILES['userfile']['name'];
>
>
>
>
>
>
if(($nomefile!=".htaccess")&&($nomefile!=".ftpaccess")&&($nomefile!=".qu
ot
> a"))
> {
>
copy($HTTP_POST_FILES['userfile']['tmp_name'],"$g_dir_corrente/$nomefile
")
> ;
> messaggio(12); // show a message to users
> echo "<br>";
> }
> else
> {
> messaggio(13); // show a message to users
> }
> }
>
>
>
>
>
> **************************************************************
>
>
>
>
>
> function uploadfile($g_dir_corrente)
> {
> $Upload_file=messaggioX(11); // show a message to users
> echo
> "
> <form enctype=\"multipart/form-data\" action=\"fileupload.php\"
> method=\"post\">
> <input type=\"hidden\" name=\"MAX_FILE_SIZE\"
value=\"1000000000\">
> $Upload_file <input name=\"userfile\" type=\"file\">
> <input type=\"submit\" value=\"Upload\">
> </form>
> ";
> }
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php