TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-04-2008, 02:58 AM   #1 (permalink)
The Visitor
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
ganda is on a distinguished road
Default 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
ganda is offline  
Reply With Quote
Old 07-04-2008, 11:58 AM   #2 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

My advice is to use JS, it's probably the easiest.. but I may be wrong.
Tanax is offline  
Reply With Quote
Old 07-05-2008, 06:24 PM   #3 (permalink)
The Contributor
 
Join Date: Mar 2008
Posts: 62
Thanks: 2
Seraskier is on a distinguished road
Default

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.
Send a message via MSN to Seraskier
Seraskier is offline  
Reply With Quote
Old 07-05-2008, 06:37 PM   #4 (permalink)
The Contributor
 
Join Date: Mar 2008
Posts: 62
Thanks: 2
Seraskier is on a distinguished road
Default

Quote:
Originally Posted by Seraskier View Post
i used document.getelementbyid('').innerHTML to change the width of a box
document.getelementbyid('').style.width, my bad
Send a message via MSN to Seraskier
Seraskier is offline  
Reply With Quote
Old 07-05-2008, 07:25 PM   #5 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

You know, there's an edit button also
Tanax is offline  
Reply With Quote
Old 07-05-2008, 07:26 PM   #6 (permalink)
The Contributor
 
Join Date: Mar 2008
Posts: 62
Thanks: 2
Seraskier is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
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..
Send a message via MSN to Seraskier
Seraskier is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:49 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design