Ah, okay. Would this also work if I wanted to apply this to multiple other pages located within different areas of the site tree? On 9/5/07, Stut <stuttle@xxxxxxxxx> wrote: > > Dan Shirah wrote: > > So: > > fruits.txt is contained in the same folder as mypage.php. > > mypage.php tries to pull the data contained in fruits.txt to see if the > > data matches > > toppage.php has mypage.php inserted as an include and checks for the > > result of $a and processes accordingly. > > In that case your CWD in mypage.php is two levels above where mypage.php > is. Change the line that reads the file to... > > $lines = file(dirname(__FILE__).'/users.txt'); > > ...and it should work fine. > > -Stut > > -- > http://stut.net/ >