'lo everyone.
I'm trying to make a CGI script in C/C++ that'll write to a file.
I can get CGI to work, read and format POST input into an array, and spit out an HTML file, but I can't seem to create a text file. I'm using the apple WebServer service. Here's a piece of my code:
FILE *hf;
hf = fopen("file.txt", "a");
fprintf(hf, "test\n");
It's not working. The apache_error_log gives me:
[Fri Nov 10 08:39:50 2000] [error] [client 127.0.0.1] Premature end of script headers: /Library/WebServer/CGI-Executables/ffstream
Thanks!