Thanks for all of your kind help.
But, I think I might ask the wrong question. I saw a php book which said that the return value of fwrite was integer.
But, what I want to do is that:
1) The user can input text info from a html page such as name, tel, add and email.
2) When the user submits the form, the info will be sent and store in a txt file of the server. If there is no such file, it will be created automatically by fopen.
Was I wrong to use fwrite? If so, which one should I use in this case?
Thanks a lot.
gogo