File upload in PHP - test script

This is a complete file upload demonstration in PHP, and it is intended that you install a copy on your own server to test uploads. Please note that this demonstration quarantines the uploaded file in a directory that's well away from the document root, and only gives you minimal access to look at the file - giving you timestamp and size data only. These limits are applied to prevent the scripot being used as a backdoor to introduce unwanted content to the web site that you are testing.
Choose a file to upload: then

most recent upload: bytes at Thu, 01 Jan 1970 01:00:00 +0100
Many visitors to our web site come here because they have found our PHP image upload - store in database - retreive - display demonstration script. Although that script is short, it uses a lot of elements one after another and from "popping a picture in" at one end to "pulling it out" at the other, a lot happens behind the scenes. This sample page / script if you look at the source shows you how to test the first stage.

The second test stage is to save the image into the database, pull it back, and make sure it is still the same

And the final test stage is to send it back as an http response.

Training sample © 2024, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/upload_test.php
See source code here • More examples - same topic here
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net