Indexing text files in a folder

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ozz
Forum Commoner
Posts: 26
Joined: Wed Aug 21, 2002 11:47 pm

Indexing text files in a folder

Post by Ozz »

I'm newbie on Php. I cannot write codes but only modify.
I need a code doing this:
I'll put text files in a folder like file1.txt,file2.txt ...
I want to search this files, list most recent 10 and if files

call, script will put into the site design with <pre> tags.
I hope I can explain what I need.
I dont know Php is suitable for that.
Please help me about this.
Thanks.
darkshine
Forum Newbie
Posts: 15
Joined: Wed Aug 07, 2002 4:15 am
Location: paris, france

Post by darkshine »

1) Yep php is suitable for that... you can do many things with php, specially handling files with arrays (pretty nice)

2) Try it yourself, you ll be glad of urself af-ter that

3)if you can' t manage , then post a msg !
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

ok, but since this is a helping forum just a few hints.
take a look here: http://www.php.net/manual/en/
  • and search for these functions
  • opendir
  • readdir
  • closedir
  • stat
  • usort
Post Reply