Well, i'm starting up a site. It uses a pretty simple php engine. The skin system uses and fread and fwrite, although when it outputs my pages sometimes it doesnt parse all the HTML from the template file! Do you guys think its something with the server, or the script;
Click that link, and refresh a few times. After like 1-3 times it will show a messed up page (because for whatever reason it cant parse it anymore)
I don't know why this is happening as well. I thought that I programmed the code correctly, because it seems to work on other sites well. Here is the other part of the code that does the FReading and FWriting.
Try adding some error handling to print out if the connecting to the file failed.
I also reccommend using file_get_contents() as it works very nicely for this type of application, it creates a perfect buffer each time, just set $this->template = to the filename, and it will put the entire thing into that varible.