PHP File Uploads | The Complete Guide to Uploading Files Using PHP
Dave Hollingworth
View ChannelAbout
Backend web development topics explained clearly and simply. Any ideas for new videos are most appreciated! If you like my content, please like my videos and consider subscribing to my channel. If you *really* like my content, please consider supporting me here: https://ko-fi.com/davehollingworth Thank you for being here!
Latest Posts
Video Description
Please consider supporting my channel: ☕ https://ko-fi.com/davehollingworth Learn how to upload a file using PHP. Full PHP course: ➤ https://davehollingworth.net/phpy In this video you'll learn how to: • create a form in HTML to select files for upload • configure PHP for file uploads • save the file locally to the web server • restrict files by size and type • rename uploaded files for security • avoid overwriting existing files Code shown in the video: ➤ https://gist.github.com/daveh/6934c8d5cd7cd4b0afa1f15ae4799484 CSS: ➤ https://watercss.kognise.dev/ PHP Documentation shown: ➤ https://www.php.net/manual/en/reserved.variables.files.php ➤ https://www.php.net/manual/en/ini.core.php#ini.file-uploads ➤ https://www.php.net/manual/en/features.file-upload.errors.php ➤ https://www.php.net/manual/en/fileinfo.installation.php ➤ https://www.php.net/manual/en/function.move-uploaded-file.php 00:00 Introduction 00:31 HTML form 01:30 PHP script 02:27 $_FILES 04:04 php.ini enable file uploads 05:02 Upload errors 06:50 Restricting size 08:44 php.ini size settings 10:30 Restricting by type 12:52 The temporary file 13:40 Move the file 16:20 Filename security 17:42 Unique filenames 19:03 Summary #PHP #files #HTML #upload
Transform Your Space Today
AI-recommended products based on this video
![Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)](https://m.media-amazon.com/images/I/61IChX1hbML._AC_UL960_FMwebp_QL65_.jpg)
Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)

Paint Sprayer Electric Spray Gun: 700W Spray Paint Gun with 1200ml Container, 4 Nozzles & 3 Patterns, Adjustable Air Flow, Easy Cleaning for House Painting, Furniture, Fence, Walls, Door (Red)

Paint Sprayer Electric Spray Gun: 700W Spray Paint Gun with 1200ml Container, 4 Nozzles & 3 Patterns, Adjustable Air Flow, Easy Cleaning for House Painting, Furniture, Fence, Walls, Door (Royal Blue)

Cordless Paint Sprayer for Dewalt 20V MAX Battery.Paint Spray Gun with Powerful Motor and 4 Copper Nozzle.650w Electric HVIP Sprayer for House Painting,Furniture, Wall, Door.(NOT Battery)

Handmade Custom Reusable Stencils, Personalized Text Stencil for Spray Painting & Sign Making, Durable Plastic, Metal & Wood Stencils, Multiple Material Options, Custom Stencil

RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

VASAGLE Console Table with Curved Frames and 2 Open Shelves, for Hallway Entryway Living Room, Rustic Brown + Black

Generic Collapsible Washing up Bowl Folding Dish Basin Bucket Portable Dish Pan Foldable Wash Basin for Camping Beach RV Backpacking, Green 38x23.5x11.5cm

Rolanstar Queen Bed Frame with 4 Storage Drawers and Charging Station, Upholstered Bed Frame Queen Size with Adjustable Headboard and LED Lights, No Box Spring Needed, Easy Assembly, Black

Rolanstar Bed Frame with USB Charging Station, Twin Bed Frame with LED Lights Headboard, Single Platform with Strong Metal Slats, Under Bed Storage Clearance, No Box Spring Needed, Noise Free

VASAGLE Queen Bed Frame with 51.4 Inch Tall Storage Headboard, Bed Frame Queen Size with 4 Storage Drawers on Wheels, LED Lights, Charging Station, No Box Spring Needed, Modern, Dark Gray URMB891G02

Rolanstar Bed Frame with USB Charging Station, Queen Bed Frame with LED Lights Headboard, Platform Bed with Strong Metal Slats, Under Bed Storage Clearance, No Box Spring Needed, Noise Free

Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

LightOnMe 35 Hour Candle for Emergency, Unscented Soy Wax Candle, Black Metal Tin, Buy Canadian-made Candles

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Crack Repair kit Windshield Repair kit, Glass Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit 2 Pack (Drakgray)

Paint Your Own Moon Lamp Kit, DIY 3D Moon Night Light with Space Figurines & Wooden Stand, Art Supplies Creativity Arts & Crafts Kit for Kids, Toys Girls Boy Birthday Easter Gift Ages 3 4 5 6 7 8 9 10 11 12+

LEGO Icons French Café Paris Building Kit - DIY Set for Adults - Collectible Bedroom and Home Decor - Display for Home or Office - Gift for Coffee Lovers - 10362

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Starter Set Herb Growing Kit Including Wooden Box, Burlap Pots, Soil Discs, Gardening Tools, Unique Easter Birthday Christmas Gift Ideas for Women Mom





















