is there a file named $filename and is it accessable from your php-scripts???
btw,
i think, if several users try to read the page with that programm on, there can be errors:
- what if so. just entered the page and the textfile is opened for writing by so. else?
(possible) solution for that:
//old code:
// $fp = fopen( $filename,"w"); // open it for WRITING ("w")
while ( ! ( $fp = fopen( $filename,"w") )
{
}
fwrite ........
so the script waits for a "correct" filepointer