Please read my reply to you. In it, I mention that, when running under a webserver, the current directory likely is not what you think. Do not use relative filenames when running under a webserver.
You could have avoided a large part of this wild goose chase by making it clear from the start, in your top post, that you are running your script under a webserver account as a CGI script. That would've made it more clear to us where a likely cause for the error lies.
In reply to Re^3: Problem printing contents of file
by Corion
in thread Problem printing contents of file
by ketaki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |