in reply to Re: Problem printing contents of file
in thread Problem printing contents of file

i tried ur script to check the file size... it goes to the else part and says ../frame.txt contains no data. but i checked and the file frame.txt is not empty. this code is in register.cgi file in cgi-bin directory and the file frame.txt is in the folder above cgi-bin folder.so am i writing '../frame.txt' correctly?
  • Comment on Re^2: Problem printing contents of file

Replies are listed 'Best First'.
Re^3: Problem printing contents of file
by Corion (Patriarch) on Jun 18, 2008 at 06:34 UTC

    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.

      hey! thanx a lot.... i put the absolute path and it works now :)
        You changed pants didn't you :)