PHP $_FILES and Handling File Uploads

  Рет қаралды 5,793

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

Күн бұрын

Пікірлер: 24
@lestercutchall2275
@lestercutchall2275 2 жыл бұрын
Steve, you are the absolute S^^^! I watched all your tutorials on MySQL and built the back side for my site. Now I'm watching the PHP videos in order to learn how to tie it into my front side. If weren't for your calm, precise manner, I wouldn't have been able to get this far. You are helping to make a dream come true. THANK YOU!!!
@LoneWolf-gl8sk
@LoneWolf-gl8sk 3 жыл бұрын
thanks prof. I tried to google about those 5 properties that each file have. didn't find any until I found this video. thank you again.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
Php.net is the official documentation site. It has everything you need.
@eduardoranierosilva
@eduardoranierosilva 3 жыл бұрын
the "enctype="multipart/form-data"" really saved me, thanks!!!
@seancolaco9587
@seancolaco9587 2 жыл бұрын
Amazing explanation!!
@skrumb
@skrumb 3 жыл бұрын
Love your commentary lad!
@ΕγωΕγω-ρ6ω
@ΕγωΕγω-ρ6ω Жыл бұрын
Thank you for sharing this amazing video with us . I would like to ask you where should i save the uploaded pictures,files on mac os ?can i create folder wherever i want?Thank you
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 Жыл бұрын
Yes. you can create folders whereever you want and call them any valid folder name. Move your files from the tmp folder into your own once they are uploaded.
@gabrielgodoy7846
@gabrielgodoy7846 2 жыл бұрын
Excellent videos!!! What keyboard do you use?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
I've used many different keyboards. Most videos are either with the MacBook Pro built-in keyboards or an Apple usb one.
@gabrielgodoy7846
@gabrielgodoy7846 2 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 Thanks for answering... when I can, I'm going to buy a Macbook :) On the other hand, I love the way you explain. I am now watching the PHP tutorial. Congratulations!!!
@hakami1426
@hakami1426 2 жыл бұрын
So quick question, is the directory where the PHP saves the files to, technically the server? Bc I know a server is just a computer somewhere
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 2 жыл бұрын
The server is the computer where the web server runs. The web server is the program that handles all the requests and responses. The web server uses the PHP program to run the php scripts. PHP saves files in a folder on the server.
@rangel3l1
@rangel3l1 3 жыл бұрын
I have a form and I would like only files of the type gif can be accepted, how can I do that in an easy way of course.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
The type property of the uploaded file gives you the mime-type. So "image/gif" is the mime type you are looking for.
@rootdev7644
@rootdev7644 4 жыл бұрын
What about with arrays n multi file uploads??
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
$_FILES is a multi-dimensional array. Each uploaded file has an entry with all those 5 properties.
@aadil4236
@aadil4236 4 жыл бұрын
I'm uploading a file and its error status is 0 which mean all is well but i can't view that file in that temp_name location in xamp This is the location : C:\xamp\tmp\php6855.tmp I checked that location in file explorer but i can see my uploaded file there Is it normal..?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
The temp files are only kept as long as needed. When your script finishes running the temp file can be deleted. If you do nothing with the file it will definitely disappear right away
@aadil4236
@aadil4236 4 жыл бұрын
But I'm using move_uploded_file() to move it into different directory right away (I'm using absolute path to move the file) , but its showing an error of "cannot move to (provided location)" and I'm printing the global file array variable afterwards to check for the error number it still gives 0 i don't know what am i doing wrong.
@aadil4236
@aadil4236 4 жыл бұрын
I even checked the owner of the directory and php user by echoing out `whoami`; the owner of the directory and the php user are same and i gave the user write permission in that directory but it still doesn't work.
@quicksketch1617
@quicksketch1617 4 жыл бұрын
How can I solve with node.js, any link or tutorial to search?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 жыл бұрын
I have a video where I talk about doing an HTTP Request from Node to get a file, bringing it back and saving it on the server. It is a similar basic process as receiving one that is uploaded. kzbin.info/www/bejne/qJmaoKOMnql5g9E
@rasmitamaryam6979
@rasmitamaryam6979 2 жыл бұрын
thank you for the video, but ur animation slide is not good :)
PHP - foreach Loops and Associative Arrays
6:13
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 18 М.
Handling Files in a REST API with PHP
10:32
Dave Hollingworth
Рет қаралды 2,8 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
PHP File Uploads | The Complete Guide to Uploading Files Using PHP
19:28
Dave Hollingworth
Рет қаралды 48 М.
PHP File Uploads - Full PHP 8 Tutorial
8:32
Program With Gio
Рет қаралды 24 М.
PHP Regular Expressions Tutorial
14:50
Clever Techie
Рет қаралды 45 М.
File Upload Progress Bar Meter Tutorial HTML5 Ajax PHP
24:39
Adam Khoury
Рет қаралды 199 М.
Session Management Intro with PHP
19:32
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 11 М.
Download Progress Monitoring with SVG Animation
32:14
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 1,6 М.
What the php.ini File Does
9:39
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 8 М.
Chrome Dev Tools Data and File Storage
14:17
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 3,1 М.