SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: file sorting

  1. #1
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file sorting

    Is it possible, in any way, to set the way the server sorts the files in a folder?
    In the same manner as you can set windows's folders to sort by date, name, last changed, etc.?

    All help appreciated.
    www.gwd.no Webdesign.

  2. #2
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you need to make a change in your httpd.conf file. Take a look at this document here :
    http://httpd.apache.org/docs-2.0/mod...exorderdefault

  3. #3
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi. Thanks for the reply.
    I have never done this before, where do i put the httpd.conf file. I have the site on a remote server and have no access to the server configuration files. Can it be done trough c-panel?
    www.gwd.no Webdesign.

  4. #4
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you want to sort by exactly ? You can probably do this with a .htaccess file.

  5. #5
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i want to sort images in a folder. by date.
    www.gwd.no Webdesign.

  6. #6
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok create a file called .htaccess in that folder and within the .htaccess file place:
    Code:
    IndexOrderDefault Ascending Date
    Change Ascending to Descending if you want to sort it the opposite way

  7. #7
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool,din't know you could do that, thanks alot
    www.gwd.no Webdesign.

  8. #8
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad you got it working !

  9. #9
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know if it's possible to retrive the date information stored with a file trough PHP?
    www.gwd.no Webdesign.

  10. #10
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to take a look at php's file functions, but yes it's possible You should check in the PHP Manual for that though

  11. #11
    Setting up a connection... mgyth's Avatar
    Join Date
    Nov 2004
    Location
    Mosjøen - Norway
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah I will, Thank you for all the help, I really appreciate it.
    www.gwd.no Webdesign.

  12. #12
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anytime!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •