Simple PHP Question
- Started
- Last post
- 3 Responses
- londonBoy
Can someone explain what the "a" parameter is specifying in:
fopen($filename, "a");
What other options can go in its place?
- Jnr_Madison0
"a" - Open file for appending - write only. Places the pointer at the end of the file. Creates file if it does not exist.
"r" - Open file for reading only. Place pointer at start of file
"r+" Open file for reading and writing. Place pointer at end of file.
"W" - Open for writing only. If file already exists then deletes it's contents. If file does not exists, then creates it.
"w+" - Open file for reading and writing. If file exsits then deletes its contents. If file does not exist then creates it.
"a+" - Open file for appending - read and write. Place pointer at end of file. Creats the file if it doesn't already exist.
- davetufts0
you can lookup any PHP funcion on their web site, with a url shortcut:
www . php . net / [function]
for example:
- londonBoy0
thank you both.