Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Poeben

macrumors 6502
Original poster
Jul 29, 2004
346
0
Hi,

So I'm having a problem with a PHP script I wrote. The basic idea is to take a directory listing of a folder using readdir() and put the file names into an array. I then pull the file names from the array and display in a table as links. The goal is for the files to be listed basically in alphabetical order (actually they begin with the date.) The file names look like this:

20061026#01-File_Name_With_Underscores.ext
where the date is in yyyymmdd format, and the #01, #02, ..., should order files with similar dates

The problem I am having is that on my webserver the files are not being listed in the correct order. Everything works fine on my local machine (10.3.9). Are there Apache options for directory listing (ex. by name, size, date etc..) that can be configured with a .htaccess file or something?

thanks for any help,

Poeben
 
Thanks iMeowbot. That did it, nice and easy. I can't believe I didn't think of that, doh!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.