#54: Uploading Images to a Directory

Periodically uploading 5 or 10 photos a week to a webserver is a bother. When I was updating my webserver, I had to save photos on my hard drive, start the FTP client, put them on the site, and then send the URL to anyone interested. There are a lot of image gallery programs that do this, but most are very complicated; I wanted to see if I could do something a little simpler.

Like all good lazy programmers, I decided to automate the process, coming up with a fairly foolproof system that allows users to upload pictures (and pictures only) into a directory. The features I wanted to incorporate would block excessively large images and generate HTML complete with height and width attributes. The first part of the ...

Get Wicked Cool PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.