Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8783975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:57:55+00:00 2026-06-13T20:57:55+00:00

I am making a resource directory for my college. I don’t know PHP and

  • 0

I am making a resource directory for my college. I don’t know PHP and I am learning things along the way. I have created the upload part successfully using dynamic dropdown lists. I have added 3 levels, first to choose which stream/dept, then which semester and then which semester, and on clicking upload, the files goes to the desired directory correctly.

Now, I want to know how to display all the files that are being uploaded? They are all in the directory. How do I list them and show my users/visitors so that they can choose what to download? The example I have attached only has 2 engg streams, 2 sems under both, and 2 subjects under each sem. I want to list out all in a segregated way. Say a page that has CSE/SEM1/ Data Structures/all the files under this category, another page has CSE/SEM2/Networks/all the files under this category. And not only list out but also form a link so that they can download it.

My index page is there right?. It has a download page navigation. I want users to click that. On clicking that, they get redirected to page similar to the upload page with dynamic drop downs. They choose the stream, sem and subject and click next. (I have to make that page) They get redirected to a page which shows the list of all the files in THAT directory (stream/sem/subj/allfiles) alone. Also the list must be linked, so that on clicking that file name, they get to download the file which they want or have a download option next to the name.

Please check my attachment/link and please help me overcome this problem at the earliest.

http://www.mediafire.com/?hevt1f4a1rpbyvp

Thank You 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:57:56+00:00Added an answer on June 13, 2026 at 8:57 pm

    To serve a file for download, create a php script that reads the file, then serves it with the proper headers

    // ensure the file exists
    if(isset($_GET['file']) && file_exists($_GET['file'])){
    
      // Read the file some.zip
      $file = file_get_contents($_GET['file']);
    
      // Set headers to serve the file for download
      header('Content-Type: application/zip');
      header('Content-Disposition: attachment; filename="$_GET['file']"'); // name file here
      header('Content-Length: ' . strlen($file)); // length of the file
    
      // echo the file
      echo $file;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im making a asp.net(2.0) website. I have defined two resource files in the App_GlobalResources
I have a header resource that I'm making use of that defines a struct
I am making an Android app, and have created a custom view to do
Making a word document of our network set-up. We have about 7 servers and
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I am making a small website as my first project. I have finalized to
Is it possible to take a csv file stored in the res/raw resource directory
I am making an iPhone app using Xcode and following is the directory structure
Hi I'm currently making an app for users to upload pics. I'm trying to
Right now, I have my own homegrown testing harness/directory structure/support doc strucure/distribution tools for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.