Reply
Upload Progress Bar??? (flash oHELP!!!
Old 09-04-2006, 11:30 PM Upload Progress Bar??? (flash oHELP!!!
Novice Talker

Posts: 12
hey so i have a working PHP code for a upload form, but i wana make a progress bar for it. and yes, i KNOW that php can't do it, but i heard Java can. so whats the code?

here is my existing PHP code:

PHP Code:
 <?php
$bad_types 
= array('application/octet-stream','application/x-msdos-program','application/x');
if( 
in_array$_FILES['uploadedfile']['type'], $bad_types ) )
{
    echo 
"That File type is not supported.";
}
else
{
$target_path "uploads/";
$target_path $target_path basename$_FILES['uploadedfile']['name']);
    if(
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
        echo 
"The file ".  basename$_FILES['uploadedfile']['name']).
        
" has been uploaded. here is the link to your file: <a href=uploads/".  basename$_FILES['uploadedfile']['name']). ">".  basename$_FILES['uploadedfile']['name'])."</a>";
    } else{
        echo 
"There was an error uploading the file, please try again!";
    }
}
?>
JustinMs66 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 09-05-2006, 06:16 AM Re: Upload Progress Bar??? (flash oHELP!!!
Rufo's Avatar
Extreme Talker

Posts: 173
Quote:
Originally Posted by JustinMs66 View Post
and yes, i KNOW that php can't do it
Using an out-of-the-box installation, this is true.

However, I achieved this on one of my sites by patching PHP with this.
If you do not have root, there are also ways of doing it using perl and JSP.

Rufo.
__________________
mp3blog.us

Last edited by Rufo : 09-05-2006 at 09:16 AM.
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 09-05-2006, 02:23 PM Re: Upload Progress Bar??? (flash oHELP!!!
Novice Talker

Posts: 12
oooo coool. but like what filez do i edit, and what should i edit for it to work?
JustinMs66 is offline
Reply With Quote
View Public Profile
 
Old 09-06-2006, 07:01 AM Re: Upload Progress Bar??? (flash oHELP!!!
Rufo's Avatar
Extreme Talker

Posts: 173
Quote:
Originally Posted by JustinMs66 View Post
what filez do i edit?
It is a patch file, you use the program 'patch' to apply the changes to the source for PHP, then recompile.
You then need to add a few lines to httpd.conf, as explained in the readme.

Note that you need root on your server to do this.
__________________
mp3blog.us
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Reply     « Reply to Upload Progress Bar??? (flash oHELP!!!
 

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13160 seconds with 13 queries