O'Reilly logo

Wicked Cool PHP by Brian Ward, William Steinmetz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

#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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required