turbo535;10985889 wrote:Notice: Use of undefined constant fclose - assumed 'fclose' in C:\wamp\www\index.php on line 51
Perhaps you were trying to call the function [man]fclose/man instead? If so, note that you're missing the parenthesis () that go along with any function call.
turbo535;10985889 wrote:And all of combinations in text file shown as AAAA<br>AAAB<br>....<br>ZZZZ not
AAAA
AAAB
AAAC.
Well yes, that's because you aren't appending a line break of any sort - you're appending the text "<br>" so that's exactly what shows up in the text file. If you want actual line breaks, then output line breaks - not a sequence of characters that an HTML parser would interpret as a new line entity.
EDIT: Oops, forgot to mention...
Why are you calling [man]fclose/man inside the for() loop? After the first iteration of that loop, you'll be closing the file pointer, so that when the next iteration of the loop executes it will be attempting to fwrite() to a file pointer that has already been closed. You shouldn't fclose() the file pointer until you're done using it.