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

  • Home
  • SEARCH
  • 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 6366177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:23:19+00:00 2026-05-25T00:23:19+00:00

Every 72 hours I upload a new PHP file to my server. (well actually

  • 0

Every 72 hours I upload a new PHP file to my server. (well actually it is an xml file transformed on the server with php) Is there a method to create a link on an html page that links to the “new” PHP doc automatically everytime a new file is uploaded?

I don’t want to manually change the link every 72 hours. I would ultimately like to have an html page with a list of links to every new doc that is uploaded. I found this for images but I need someting like this but for PHP files and links.
http://net.tutsplus.com/articles/news/scanning-folders-with-php/

Any help would be very appreciated.


I found a solution that add links to the xml files. Now I just need to figure out how to add a link to reference the xslt sheet for each new xml file that is upload AUTOMATICALLY. I am not sure how to do this but any help would be very helpful. Thanks for everyones help.

<?php
$count = 0;
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
    if ($file != "." && $file != "..") {$count++;
        print("<a href=\"".$file."\">".$file."</a><br />\n");
    }
}
echo '<br /><br /><a href="..">Return</a>';
closedir($handle);
}
?>
  • 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-05-25T00:23:20+00:00Added an answer on May 25, 2026 at 12:23 am

    You can do that pretty easily with PHP function readdir:

    http://php.net/manual/en/function.readdir.php

    Simply loop through the files in the directory where you upload files and have php output a link for each.

    ie:

    <?php
    if ($handle = opendir('/path/to/upload_dir')) {
        while (false !== ($file = readdir($handle))) {
            if ($file != "." && $file != "..") {
                echo '<a href="http://myserverdir/' . $file . '">' . $file . '</a><br />';
            }
        }
        closedir($handle);
    }
    ?>
    

    You’ll need to edit the http:// URL on the href to point to the correct download URL for your server, as well as the server path for opendir.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a new log file every hour with the following code
I want to call parsePage() method every 2 hours, the method will process the
I want to write to a log every 3 hours using System.IO There is
I need that my app will send some data to server every six hours
We are generating a newsletter automatically every 24 hours using a rake task. There's
How would it be possible to call a method every 2 hours in C#
I have this command that I run every 24 hours currently. find /var/www/html/audio -daystart
We have a process that needs to run every two hours. It's a process
I would like to run a timer for every 5 hours and delete the
I need to automate an IM client to update a status every few hours,

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.