Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Upload Progress Bar??? (flash oHELP!!!
Old 09-05-2006, 12:30 AM Upload Progress Bar??? (flash oHELP!!!
Novice Talker

Posts: 12
Trades: 0
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
 
 
Register now for full access!
Old 09-05-2006, 07:16 AM Re: Upload Progress Bar??? (flash oHELP!!!
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE

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

Posts: 12
Trades: 0
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, 08:01 AM Re: Upload Progress Bar??? (flash oHELP!!!
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Reply     « Reply to Upload Progress Bar??? (flash oHELP!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.45370 seconds with 12 queries