Page 1 of 1

Indexing text files in a folder

Posted: Wed Aug 21, 2002 11:47 pm
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.

Posted: Thu Aug 22, 2002 10:16 am
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 !

Posted: Thu Aug 22, 2002 11:09 am
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