Hello,
I am trying to work out how to write a web server program that will serve a single file via a HTTP GET request if the file exists otherwise give the user a 404 error.
I have started by...
Type: Posts; User: daza166
Hello,
I am trying to work out how to write a web server program that will serve a single file via a HTTP GET request if the file exists otherwise give the user a 404 error.
I have started by...
Thanks for reply guys,
So what would be the best way to go, as I can not visually see numbers so how do I know if the program is copying files correctly? delimiters may be the way to go, but I still...
Hello guys,
Just got a question regarding my program which user inputs a file and I read content inside and create exact copy of file, with the same name.
I have got it working fine for...
itme86,
Say I want to write() 4 bytes(int) to a file and read() that 4 bytes back out and put the value into inside those 4 bytes into a variable
//open () .........opens approp files
...
itme86,
ok managed to sort program myself, just stuck on little issue
) How do I write a variable into a file using write() function, it returns an error
say I want to write() an integer...
looked in ghex but could not work out, what it means, here is bit of first line is like
00000000 69 6E
00000011 61 72
00000022 73 74
nothing on the clear text on side, just content can...
itme86,
the problems is when I say add one file
read(fdin, (short*)&numfiles, sizeof(short));
and then
printf("%d\n", numfiles); -- returns 28265 , should that not be '1' as only 1 file...
itme86,
hello again, just encountered a error I am stuck on: -
--) When adding files to archive ( the first program), when we go back to write() the header data, we reserved 2 bytes(short) at...
itsme86
ok, so they are two programs. With the extract program would it not be easier to just extract all files, instead of one?
The first two bytes of the archive file, would be int like 13,...
itsme86,
just a little bit confused with extract code you provided, perhaps comments?.
Is it using structure data from when files are read in? The problem is that when user runs extract...
Thanks itsme86,
Thanks that really helped me!!! I have now successfully got the program taking user input of files to add, got some error checking on them and using read() write() adding them into...
Hello itsme86,
Thanks for that useful info. To sum up everything down you have told me so far:
1) I have changed ' write_to=write(archiv, buffer, file1_status); ' - so only writing into the...
Thanks for quick replies guys. You have given me few ideas, if I use a header file would it probably be better to have it in a separate file to the actual output file?
To give you better idea of...
Hello,
I am stuck on my C program which allows users to add files into an output (archive) file and also extract them all back out, ie so user can back up files on his system.
My program has...