Hi,

Im using this command - but have a problem :-

=============
$t=`ls -l -t *.txt`;
$pieces=explode("\n",$t);

echo "<CENTER>\n<TABLE CELLPADDING=5>\n";

echo "<TR><TD>Date</TD><TD>Title</TD><TD>Key-words</TD></TR>\n";

foreach($pieces as $ke => $va){

echo "\n\n\n\n<!-- DA '$ke' '$va'<BR> --!>\n";
 
if(preg_match("/www\s+(\d+)\s+(\w+\s+\d+\s+\d+\:\d+).*?(\w.*?.txt)/i",$va,$matches)){

etc..  (the preg match only matches against one file)

=============

OUTPUT :-

======================


<!-- DA '0' '-rw-r--r--    1 wwwuser  www          3060 Mar  9  2007
intro_imod.txt' --!>

<!-- DA '1' '-rw-r--r--    1 wwwuser  www           273 Mar  9 22:50
side.txt' --!>

<!-- DA '2' '-rw-r--r--    1 wwwuser  www         30420 Mar  9 22:50
1_GOA.txt' --!>

======================

is thuis correct ??

Why does the 1st one appear as "Mar 9 2007"  & the others have "Mar 9
& then the time they were modified ??

(those two files were updated MONTHS ago - I modified the intro file
today (just to check)...  - However it changed to '2007' - but still
shows MAR 9 ???? )


QUESTION :-

1)

Is there a way to change :- $t=`ls -l -t *.txt`;

- but to show a consistent format for ALL files - regardless of if
they were modified 5 minutes ago, or 5 months ago....

2) PS I want to show them in descending order (from modified time) - I
think thats how it is already... )

-- 
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to