|
Posted by Gernot Frisch on 09/28/10 11:42
"jukka" <ikaros@REMOVEMEsci.fi> schrieb im Newsbeitrag
news:dv9ctk$kn3$1@phys-news4.kolumbus.fi...
> So I coded this flat file database, and one module is a script that
> displays five latest entries (script below). The files in dir/ are
> stored as 0001.html, 0002.html, etc via another script. Each html
> file has a html commented header that looks something like this:
> <!--
> title=Hello, this is the title
> date=2006-01-23
> -->
> So this here script gets the title from the header and displays it.
> Now I'm wondering that if I have several files in the directory,
> would it be too heavy a script to have to read through all of them
> (since the fread() can make the script pretty heavy anyway)? Is
> there a way to get just the last five filenames in the directory
> _without_ reading the whole directory? This way I could include the
> last five files in a blog-like way, without having to read the whole
> dir/ with glob().
>
store their file names in a dictionary file?
Navigation:
[Reply to this message]
|