PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The problem is that both 'fopen' and 'file' open files, with the path to the file specified as a string. I'm not exactly clear on what specifically you wanted out of those two statements, so I'll just give a couple examples:
// this will open the file and return an array of all lines in the file
$contents = file("m:\\html_parts\\html02.txt");
// this, however, only returns a handle to the file specified. After you
// have this handle, you can perform read operations using functions
// such as 'fread', etc.
$fp = fopen("m:\\html_parts\\html02.txt", 'r');
Since you are dealing with straight text here, my guess is you DO want an array of lines from the file, so go with example 1.