TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   Please Help, How to show upload progress information (http://www.talkphp.com/advanced-php-programming/3067-please-help-how-show-upload-progress-information.html)

ganda 07-04-2008 02:58 AM

Please Help, How to show upload progress information
 
I'm using wampserver, including php 5.25
and i'm try to show the progress upload information
and it always fail, the browser is not responding
I'm already use php_progressbar.dll
please tell me what i had to do, here is the source code:


<?php header("Cache-Control: no-cache, must-revalidate"); ?>

<!-- The data encoding type, enctype, MUST be specified as below -->
<form action="u.php" method="POST" enctype="multipart/form-data" >
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="UPLOAD_IDENTIFIER" value="1325a38f55c0b1b4" id="UPLOAD_IDENTIFIER" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />

</form>



<?php
/* PUT data comes in on the stdin stream */

print_r(uploadprogress_get_info("1325a38f55c0b1b4" ));
$putdata = $_FILES["userfile"]["tmp_name"];
move_uploaded_file($_FILES["userfile"]["tmp_name"],"zzz.dat");
print_r($_FILES)

?>

Please anyone can help me :-)

Thank You

Tanax 07-04-2008 11:58 AM

My advice is to use JS, it's probably the easiest.. but I may be wrong.

Seraskier 07-05-2008 06:24 PM

i did something like this before in javascript.

i used document.getelementbyid('').innerHTML to change the width of a box
just use a timer to check the file size completed every second or so and just update the width of the box in percentages.

Seraskier 07-05-2008 06:37 PM

Quote:

Originally Posted by Seraskier (Post 16644)
i used document.getelementbyid('').innerHTML to change the width of a box

document.getelementbyid('').style.width, my bad

Tanax 07-05-2008 07:25 PM

You know, there's an edit button also :-)

Seraskier 07-05-2008 07:26 PM

Quote:

Originally Posted by Tanax (Post 16648)
You know, there's an edit button also :-)

hah, yeah i know
10 minutes later i figured someone looked at it so i didnt edit it..


All times are GMT. The time now is 06:41 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0