Twisp Web Works

... Web Dev

Web Development


Downloadable PHP scripts

Upload-Me-Hyperlinked. Click to download a zip file with the template files, folders and scripts used to run Upload-Me-Hyperlinked. See desciption below.

Upload-Me-Hyperlinked

This set of files and PHP scripts creates links to files within linked-to subfolders. This example can be used to maintain an online upload/download ftp site without having to manually create pages of links.

See an example of Upload-Me-Hyperlinked here.

Steps to create a linked folder named upload containing linked files in named subfolders (also see the comments within the php scripts).

Template files and folders are created by copying this struSteps to create a linked folder named upload containing linked files in named subfolders (also see the comments within the php scripts).cture:

  /upload  (the folder name on the server)
    index.php (script that creates links to subfolders)
    /my-documents  (FILES TO LINK TO GO HERE; 
                           rename subfolder as desired)
      index.php (redirection pointer to files/index.php)
      /files 
        index.php (script to create dirlisting.htm)
        dirlisting.htm (file created on-the-fly linking to files in the folder)

(The folder "my-documents" can be any name desired. It will become the name of the linked to folder)

3. Upload documents into the "my-documents" folder.

That's it, all you have to do is just click on the upload folder and the php scripts will create a set of linked folders and files.

Opening upload/index.php creates and loads index.htm in the same folder. Index.htm presents a clickable list of subfolder names, that actually point to the /files subfolders within the user-created folders. Opening the /files subfolder loads /files/index.php which recreates the file "dirlisting.htm" and loads it into the browser to display a clickable list of files in that folder.

If the container folder (e.g., "final-example") is clicked instead, the index.php file in that folder redirects the browser to the /files subfolder.

The path to the stylesheet is explicit since a path variable can get lost.

- Copyright granted to the Public Domain 2008-3008 by Twisp Webworks

- Not responsible for any damages. Always backup files before tinkering!

Happy button-clicking - George Wooten