SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    California
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retrieving documents from an archive on a hard drive using PHP

    Hi:

    I'm trying to create an archive so that people can upload there newsletters, store them on the web server's harddrive, and display a link to each document in the archive.

    At first I wanted to use something similar to filestore.php in KY's book, however, MySQL won't accept packets greater than 1MB (no, my hosting company won't adjust the variable to increase the packet sizes-changing companies is not an option at this point).

    So, I'm wondering if anyone knows of a script or can point me to a tutorial that will explain how to use PHP and MySQL to manage the archive, retrieve the files, and write the HTML, but store the archive on the web server instead in the MySQL DB. This could be something similar to the automated photo gallery, but without the thumbnail creation.

    Thanks in advance!

  2. #2
    SitePoint Enthusiast Redprince's Avatar
    Join Date
    May 2004
    Location
    Salzgitter, Lower Saxony, Germany
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whenever I upload a file for showing it on my homepage, I insert a new row in the database. It includes the filename, the size and a little description. It is very easy to get all the filenames now and print links on the site.
    Uploading files is very easy, too: use a <input type="file"> and add the parameter enctype="multipart/data" to your <form>-tag. Then see what $_FILES has for you
    I am not part of the allesburner. I am the allesburner.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •