I have a problem with a script where a "file for inclusion" statement caused the server to fall into a loop. A simple else if statement to display a message if the specific file doens'nt exist would solve the problem.
1) A request is made to the server. (Example below)
[login to view URL]
2) The specific file for inclusion doesn't exist so the server gave error message.
Warning: fopen(/home/waterval/public_html//public/contents/english///[login to view URL]): failed to open stream: No such file or directory in /home/waterval/public_html/contents/[login to view URL] on line 18
Warning: fgets(): supplied argument is not a valid stream resource in /home/waterval/public_html/contents/[login to view URL] on line 20
Warning: feof(): supplied argument is not a valid stream resource in /home/waterval/public_html/contents/[login to view URL] on line 22
Warning: fgets(): supplied argument is not a valid stream resource in /home/waterval/public_html/contents/[login to view URL] on line 23
3) Instead of terminate after the error, the server keeps sending the error (for line 22 and 23 as above) over and over and over, resulting in a HUGE waste of bandwidth.
Rgs
Frank