PHP Tutorial: HTML5 Multiple File Upload [part 01]

preview_player
Показать описание

In this part I explain the basics of multiple file uploads with html5 and show a quick example.
Рекомендации по теме
Комментарии
Автор

I have been trying to get multiple uploads to work for like the last week and I finally stumbled on this video and I can now continue to what I suspect is the actual hard part of my work. >_>

TiaShelley
Автор

thank you sir. nice example you gave at here. really such an educational tutorial helps a lot of students like me. thanks a lot.

GauravSharma-lrrz
Автор

@betterphp thanks for the quick response, i had tried that earlier but for some reason its not echoing the error, may be because 'myfiles[]' is an array am not sure....because the same error detection works fine on a single file upload script....

Momobeats
Автор

@TeenAviator its just what that function is for, the two methods are basically the same.

betterphp
Автор

@semihbalcioglu Possibly, you can always ask them :) I think 20 is the default.

betterphp
Автор

hi, that was really helpful but here's the thing

i want the (uploader) to change the names of the (uploaded files) with a [names that i specify in the code]
and i mean the whole name, example : THIS_IS_NAME.JPG

wassemalrawi
Автор

@TheNerdRager I think its either version 9 or 10 that requires the min and max.

betterphp
Автор

Thanks, this worked for me, but I have a slight problem.
I've an existing html/css code I wanted to use and being as lazy as I am, I simply copied the html-code into the php-file. Then it complained on several things like div-tags or comments. To solve this I created a seperate php-file where the php-code from this tutorial is currently in.

When I upload the files I'm being redirected to the blank php-file (as there's no html-code in it).
Is there any way I can avoid being redirected or automatically redirect to the original page (in this case, the html-file)?

Haftepaff
Автор

how do you display the files that have been uploaded permanently on a page from the folder they are stored in?

geeno
Автор

@timailius Interesting problem ! Can you post on the forum and we can try and work it out there ?

betterphp
Автор

Hi timailius... even i faced the same problem bt changing "max_file_uploads" in php.ini file helped me.... hope it helps you :)

davindersinghvij
Автор

Interestingly, this only occurs in Chrome/Firefox. Safari limits to 20 files, but does NOT follow the same total size limits. In fact, I can't figure out what it's doing... it allows 20 files @ 2600 KB, (= ~52, 000 KB), but denies a single .avi file @ ~25, 000 KB. So when the individual files are smaller, it allows them...?

I've been scouring the internet with no success. Php.net talks about limits set in php.ini files, but that should be constant over all browsers, yes? Any help would be great.

timailius
Автор

Great tutorial, your videos are really helpful!

I am having similar problems with limitations on number of files, (20 seems to be the max), but more importantly, I'm having issues with limits on total upload size. After testing files of varying sizes, it seems to allow a total upload size of 8194 Kb, but will simply reset at a total upload of 8195 Kb, (i.e. peaking at ~8 MB). Which means video files of 12+ MB are out of the question...

Any idea how to set/reset this limitation?

timailius
Автор

so can anyone tell me about why he put the key there? or can direct me to the video of where he explains it? is it the video for arrays?

firekid
Автор

hello how are you... i have a question.. where is the location for that empty folder. I am trying to follow your video but I get the error because the php code can not find the location of this folder.. where do I need to store it? thx

Achro
Автор

First of all I want to say that I really really like your video.
But in my case it only works with 7 files (I am using images).
Maybe it is because I am using Firefox or is there another reason why it would not work although I had 1000 set as the maximum of files ?

assydiddy
Автор

@assydiddy It would be easier to help if you post on the forum,

betterphp
Автор

Excellent. I love your videos! Why do you use 'isset($_FILES['file'])' to check if it's there instead of just saying:

if ($_FILES['file']) {
// code
}

? Thanks XD

teenaviator
Автор

I have tried it with Opera now and the problem is the same

assydiddy
Автор

Hey I was wondering, I downloaded gedit, and after I downloaded it I can't see
any exe file..

How can I open the gedit? XD
I searched all of the folders still no gedit execution file @_@

VigilianceAurelious
welcome to shbcf.ru