View previous topic :: View next topic |
Author |
Message |
FuriousD -
Joined: 06 May 2004 Posts: 3
|
Posted: Thu May 06, 2004 8:02 pm Post subject: Directory Indexing Date Format |
|
|
Hi... im running v X1 web server and I would like to know if there is a way for me to change the date format in a default directory index.
I have several folders with text files accessible via the web as directory indexes. The date shows up as DD/MM/YYYY. This is confusing to some of the people using these files since they think that it is actually MM/DD/YYYY.
Is there any way to change this date format to MM/DD/YYYY ?
Thanks. |
|
Back to top |
|
 |
nquin321 -
Joined: 29 Jan 2004 Posts: 296 Location: Right Behind You
|
|
Back to top |
|
 |
eznetlinks -
Joined: 27 Sep 2003 Posts: 144
|
Posted: Thu May 06, 2004 9:13 pm Post subject: |
|
|
Use this as your index file.
index.php
<?php
echo '<table width=400pxl>
<tr><td><u><b>File</b></u></td>
<td><u><b>Last Modified</b></u></td></tr>';
if ($folder = opendir('.')) {
while (false !== ($file = readdir($folder))) {
if ($file != "." && $file != "..") {
echo "<tr><td><a href=$file>$file</a></td><td>";
echo date ("F d Y H:i:s.", filemtime($file));
echo "</td></tr>\n";
}
}
closedir($folder);
}
echo "</table>";
?> |
|
Back to top |
|
 |
FuriousD -
Joined: 06 May 2004 Posts: 3
|
Posted: Fri May 07, 2004 4:50 pm Post subject: |
|
|
thanks, i'll try
Do i need to install anything to use PHP? never used it be4... |
|
Back to top |
|
 |
FuriousD -
Joined: 06 May 2004 Posts: 3
|
Posted: Fri May 07, 2004 5:22 pm Post subject: |
|
|
nevermind... |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Fri May 07, 2004 6:08 pm Post subject: |
|
|
Would it not just be easier for Aprelium to change to the international data format for directory indexing?
YYYY-MM-DD
http://www.w3.org/QA/Tips/iso-date _________________ Olly |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Fri May 07, 2004 6:25 pm Post subject: |
|
|
And that's backwards why ? It would be easier for Aprelium to leave it alone, obviously, since changing involves work. As it stands currently, it produces logs in the Common Logfile Format, meaning the logs can be interpreted easily by many different applications, you want it broken ? |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun May 09, 2004 1:10 pm Post subject: |
|
|
olly86,
The directory indexing in the next version will have many features and will offer many parameters (such as the date format.) _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|