okay, please bear with me.. i'm trying to understand when the textfile would get executed. would it be in the include function?
if that were the case, then i don't see how that is possible in my original code.
example 1: pages.php?page=http://gak-pake.com/mail.txt
my fileSearch() goes through a specific directory (and its subdirectories) looking for http://gak-pake.com/mail.txt.php. fileSearch() returns null since http://gak-pake.com/mail.txt.php is not found in my directory. since it's null, then include() is not even used.
example 2: pages.php?page=Events
my fileSearch() goes through a specific directory (and its subdirectories) looking for Events.php. fileSearch() returns the location of Events.php since the file is located in one of my subdirectories. in this case, include($contentFileLocation) is executed.
i just assumed that would be a safeguard..
anyway, thank you so much for your help!! i'm a newbie to php, and just followed the manual to create my code, so my experience is very, very limited.