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 8540651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:38:54+00:00 2026-06-11T11:38:54+00:00

I am currently developing in Drupal 7. My client will be uploading PDFs to

  • 0

I am currently developing in Drupal 7.

My client will be uploading PDFs to a folder online. I need links to automatically populate on a content page based on what is in the folder.

So if there are 5 PDFs in the folder Drupal will automatically display 5 unique download links to the PDFs. Thanks for the help.

  • 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-11T11:38:56+00:00Added an answer on June 11, 2026 at 11:38 am

    I found a solution.

    <?php
    if ($handle = opendir('/path/to/uploaded_files')) {
    while (false !== ($file = readdir($handle))) {
    if (substr($file,0,1) == ".") continue;
    if (is_dir($file)) continue;  
    if (substr($file,-3,3) != "pdf") continue;
    echo '<a href="';
    echo $file;
    echo '" target="_blank">';
    echo $file;
    echo '</a><br>';
    }
    closedir($handle);
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a Drupal 7 site where I use Page Manager's node_view to
I'm currently developing a module for Drupal 6, in which I have created a
Currently developing a PHP framework and have ran into my first problem. I need
Im currently developing an In-House Enterprise application. I will publish the app using Apple
I am currently developing an application and I need to be able when pressing
I am currently developing an application , that will be published on appstore. I
I am currently developing a site for a client (http://184.168.136.225/). Having some issues with
Im currently developing a system where the user will end up having large arrays(
Im currently developing this site so none of the content on there is actually
Im currently developing this site so none of the content on there is actually

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.