View Single Post
Old Mar 5th, 2005, 10:18 AM   #2
Aphex_Twin
Newbie
 
Join Date: Mar 2005
Posts: 27
Rep Power: 0 Aphex_Twin is on a distinguished road
I actually managed to compile a script to do something, yet it can't open files. Any help would be most welcome

Here is the source of the test program I compiled:
#include <stdio.h>
#include <stdlib.h>

main()
{
FILE *f;
f=fopen("http:\\\\127.0.0.1\\cgi-bin\\database.txt","a");
if (f==NULL)
{
printf("Content-type: text/html\n\n");
printf ("<p>ERROR!</p>");
}

fprintf (f, "%c ", 'X');
fclose(f);
}


This outputs "ERROR!" all the time and the file is not modified (although it exists at that location)
Aphex_Twin is offline   Reply With Quote