This example page demonstrates the function of four PHP file handling and directory scripts available (for free) on this site.

PHP upload function - PHP Upload Class

This basic upload script is able to upload your script and has an option to replace an existing file on the web server.

Max. filesize: 80KB | Allowed file extensions are: .png, .zip, .pdf, .gif, .jpg, .jpeg

DigitalOceanSSD Cloud Server from $5/month by DigitalOcean, simple cloud hosting, built for developers. Receive $10 in credits »
ServerPilotServerPilot is the best way to run WordPress and PHP sites on your DigitalOcean servers. First month free »

PHP download & directory functions

The SELECT menu shows all uploaded files and after a file is selected, the PHP download script will open the file and sends the data to your web browser.

The download of files is on your own risk! Download only the file(s) you've uploaded before.

Directories oldest file

I use this script to remove the oldest files at the moment a new file has been uploaded.

Create a SELECT menu from a directory

All files from the upload directory are selected and parsed using PHP directory functions. This custom function creates a select menu for all the files. The value from that select element is posted to the download form.

Relevant PHP functions

We remove all uploaded files frequently. Please keep this demo clean and upload only those files you like to have on your own website!