Jump to content

php upload with progress bar


urban

Recommended Posts

hi i am trying to build a php upload from a form which will upload a 100mb file, i think i will need a progress bar as it just looks like the page has hanged.

 

I have googled serveral scripts but have found nothing that will be simple to include into my page.

 

Can u help

Link to comment
Share on other sites

<?php 
// Where the file is going to be placed 
$target_path = "/URLfor-the-file-to-be-uploaded-to";

/* Add the original filename to our target path.  
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); ?>

<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>

 

This is a simple upload form, I'm not sure if it works, I aint tested it, but it looks promising. To create a progress bar, it could be done with Flash as stated in previous replies, alternatively, you would use PHP and AJAX. Check the links given for the progress bars.

Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.