Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Directory Files Displaying
itssami
post May 13 2006, 07:08 PM
Post #1


Super Member
*********

Group: Members
Posts: 258
Joined: 13-November 05
Member No.: 14,234



I have many files in a directory..I want to create a page , like
A B C D E F .....
when some one click on A , it should display all the files starting from letter A , and when clicks on B , it should show all the files in that directory starting from B , and so on... I have no idea how to display the files of the directory iin that way.
Kindly assist me..
Go to the top of the page
 
+Quote Post
farsiscript
post May 14 2006, 01:30 PM
Post #2


Super Member
*********

Group: Members
Posts: 357
Joined: 8-April 06
Member No.: 21,487



You can make That with SQL database and files url
You can make one page with search query with "a" or "b" or "c" or ....."z"
when your users click at "a" your php code must go and file A files in database and sort it for your user .
or You can make these files with statics search guery
a.php , b.php , c.php , d.php , e.php ,
When Your user click at "A" You must link at a.php



This post has been edited by farsiscript: May 14 2006, 01:32 PM
Go to the top of the page
 
+Quote Post
jlhaslip
post May 14 2006, 02:56 PM
Post #3


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,081
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol



Ittsami,
My suggestion would be to:
Begin by building an array of the letters of the alphabet (a-z) and producing the list of links that would select the letter. (maybe a pull-down listbox?)
Then use that letter as a search/sort criteria of the directory list. Write the file names into another array, then sort the array, then echo the list using a function similar to the one which you have been earlier provided with to list file names from a directory, except this time, use the array of filenames as the function source rather than the directory contents.
A Database would not be required if there were only a small list of files, but it would be faster to use the Database approach as suggested above if there were lots of files in the Directory.
Go to the top of the page
 
+Quote Post
Inspiron
post May 14 2006, 04:25 PM
Post #4


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,203
Joined: 25-March 05
Member No.: 4,883



It's done... I've sent the files to you.. Check out for bugs and let me know.. smile.gif

Also, with regards to the replies above, I would like to point that there isn't a need to use a database. In fact, having a database isn't efficient when there is a whole lot of files added to the directory, and you will have to update the database. If a hundred connections are accessing the directory, the database will have to undergo maintanence very often when each connection changes the directory structure. In fact, I've remade a script done by itssami to use only itself, 1 file, to handle the directory structure without the need of using a database or a requirement of a 2nd php file. This way, it's alot more easier for debugging and administrating his web site.

This post has been edited by Inspiron: May 14 2006, 04:35 PM
Go to the top of the page
 
+Quote Post
jlhaslip
post May 14 2006, 04:38 PM
Post #5


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,081
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol



So could you post the code here so we can all benefit?
Go to the top of the page
 
+Quote Post
Inspiron
post May 14 2006, 04:44 PM
Post #6


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,203
Joined: 25-March 05
Member No.: 4,883



QUOTE(jlhaslip @ May 15 2006, 12:38 AM) *

So could you post the code here so we can all benefit?

I'll leave it to itssami to decide if he want's to release the source codes..
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Converting Video Files From One Format To Another(6)
  2. Does Anyone Know How To Make Exe Files(19)
  3. The New And Very Good Free Host Server(13)
  4. Linux Question: Amarok And File Permissions(4)
  5. Strange .log Files On My Desktop(10)
  6. Informix To Sql Server (or How To Open .unl Files)(2)
  7. Eclipse Exporting .jar Files(5)
  8. How To Disable "show Hidden Files And Folders" In Folder Option(12)
  9. Sharing Files And Printer Between Windows Vista And Xp(9)
  10. Php Ftp Upload Form(1)
  11. How To Display Images Of A Directory(4)
  12. Converting Audio Files In Vista(7)
  13. 1350 Great Free Logos (jpg + Psd)(8)
  14. Best Way To Transfer Files(6)
  15. Jar Executable Files(3)
  1. Audio Files?(5)
  2. Naming Web Page Files(9)
  3. How Can You Get Audio Files From Itunes Videos?(1)
  4. Auto-upload Files With Filezilla And Autohotkey(0)
  5. Browse System Files In The Browser...(2)
  6. Lan Surfer In Linux(2)
  7. Firefox Temporary Media Files(0)
  8. Panasonic Lumix - Problems With Movie Files(0)
  9. How To Download Any Flv Files From Any Sites(6)
  10. Clearing Your Ie Tif(0)
  11. How To Create Pdf Files Using Free Tool(0)
  12. X Files: I Want To Believe!(2)
  13. Deny Or Grant Users Access To Files Of Choice (vista)(3)


 



- Lo-Fi Version Time is now: 12th October 2008 - 08:54 PM