I use fopen() in a template system that I have developed.  I noticed
that occasionally I get blank pages served up.  Here is one of my
snippets.

$filename = "$ROOTDIR/content/myfile.txt";
$fd = fopen ($filename, "r");
$PAGE_CONTENT  = fread ($fd, filesize ($filename));
fclose ($fd);

Doing this I get the contents of the file read into the $PAGE_CONTENT
variable.  

I never use fopen() to write to files.  Only read with the "r"
directive.  So what could be causing my conflicts?  Do I need to flock
the file to shared?

I am running Linux PHP, Apache and Linux.

David McInnis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to