[Techtalk] C programming: question on fopen() parameters

Berenice Chong showercurtain2000 at yahoo.com
Wed Oct 8 04:49:07 EST 2003

I'm writing a test CGI script in C that writes form information into
a file. There needs to be a file for every form submitted.  My
problem is using fopen to open a file in another directory.  The file
name is the script process ID and if I do this, the file gets created
in the current directory:

char filename[6];

What's the correct way to write the first parameter in fopen(), so
that the file appears in a different directory? 


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

More information about the Techtalk mailing list