Jump to content

File Access Calculation HALP


supraman

Recommended Posts

Hi .. im new here n kinda in a fix .. i need a dynamic script which takes input of number of days and folder name in a specific directory and gives me back the last files accessed in that folder over the number of days entered :S .. PHP isn't xactly one of my strong points so HALP PLZ .. i've still managed to come up with a smaller version of the code required .. here :

 

<?php

// outputs the username that owns the running php/httpd process

// (on a system with the "whoami" executable in the path)

echo exec('find /srv/serials/a -atime +2');

 

$fName = "access.txt";

 

$fh = fopen($fName, 'r');

 

 

while(!feof($fh))

 

{

 

        $line = fgets($fh);

 

        echo('<br>'.$line);

 

}

 

 

 

fclose($fh);

?>

 

regards,

the supraphpn00b =/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.