On 23-May-01 Jon Yaggie wrote:
> Okay I am making a small script for a web design company. What it does so
> far is take info - name, email, username,, pasword - which as all inputted
> by the designer. Then it creates a directory clients/$username on the
> company's server for the temp home of the clients web site. The design then
> ftps all files into this directory. Other than index.html I have no idea
> what the other files will be. so here is the problem
>
> I need to find the last update of one of any file in clients/$username.
> With out specificly knowing any of the filenames. As i can see there is no
> way for my script to list the files in this directory and there is no
> function to test for modifications of all files in a fiven directory.
>
> in the end i want that when the client logs in the script can spit out "you
> website was last updated -----"
>
> Ideas?
$cmd ='ls -t $dirname | head -1';
$p=popen($cmd, 'r');
$fname=fgetss($p,1000);
$mt=filemtime($fname);
pclose($p);
echo $fname, ' modified on ', strftime('%b %e, %G', $mt);
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]