owen

I have this routine written in PHP for PageCat that basically looks through a directory for a filenames that match a certain regular expression, then includes them, like this:

$handle = opendir(".");
while ($actionfile = 
 readdir($handle)) {
  if(is_file($actionfile)) {
    if(eregi("^stuff_.*.php$", 
     $actionfile) > 0) {
      include($actionfile);  
    } 
  }
}

So this usually works.  But for some reason, every so often, it just stops working.  I mean, it's going along fine for a few days, and then all of a sudden BLAM!  And then it doesn't work any more at all.

How it fails is even more odd:  It actually finds the file, it executes the include, but it doesn't show any evidence that the file was included.  Even more weird is that I have two such eregi() statements inside my actual loop, and the first one includes just fine, but the second one doesn't.

Finally, just to throw another oddity into the mix, if I re-upload the exact same file (like first download it then re-upload it) to the same place, it will include that file just fine.  But no other file that matches the regular expression will be included.

I have recently added some stuff to try to track down why this happens.  I really don't understand how this can be.  There is no code in the included files that is date-sensitive.

Anyway, I'm reminded now from writing this that I should switch these over to PCRE, so I'll be using preg_match() instead of eregi().

Speaking of weird computer stuff, Internet Explorer on my work system just today decided to stop viewing source.  I didn't do anything to it.  In the morning, View Source worked.  In the afternoon, it didn't.  I went through a few web pages I found on the subject, and apparently this happens reasonably often, with no solid explanation or remedy.

Oh, well, back to Opera.