Lines Matching refs:file

2 Test fgets() function : usage variations - read when file pointer at EOF
13 Description: Gets a line from file pointer
16 // include the file.inc for common test funcitons
17 include ("file.inc");
30 echo "\n-- Testing fgets() with file opened using mode $file_mode --\n";
40 echo "Error: failed to open file $filename!";
44 echo "-- fgets() with file pointer pointing at EOF --\n";
45 // seek to end of the file and try fgets()
46 var_dump( fseek($file_handle, 0, SEEK_END) ); // set file pointer to eof
47 var_dump( ftell($file_handle) ); // ensure that file pointer is at eof
51 var_dump( ftell($file_handle) ); // file pointer position
52 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
54 //close file
57 // delete file
67 -- Testing fgets() with file opened using mode w+ --
69 -- fgets() with file pointer pointing at EOF --
77 -- fgets() with file pointer pointing at EOF --
85 -- fgets() with file pointer pointing at EOF --
93 -- fgets() with file pointer pointing at EOF --
101 -- Testing fgets() with file opened using mode w+b --
103 -- fgets() with file pointer pointing at EOF --
111 -- fgets() with file pointer pointing at EOF --
119 -- fgets() with file pointer pointing at EOF --
127 -- fgets() with file pointer pointing at EOF --
135 -- Testing fgets() with file opened using mode w+t --
137 -- fgets() with file pointer pointing at EOF --
145 -- fgets() with file pointer pointing at EOF --
153 -- fgets() with file pointer pointing at EOF --
161 -- fgets() with file pointer pointing at EOF --
169 -- Testing fgets() with file opened using mode a+ --
171 -- fgets() with file pointer pointing at EOF --
179 -- fgets() with file pointer pointing at EOF --
187 -- fgets() with file pointer pointing at EOF --
195 -- fgets() with file pointer pointing at EOF --
203 -- Testing fgets() with file opened using mode a+b --
205 -- fgets() with file pointer pointing at EOF --
213 -- fgets() with file pointer pointing at EOF --
221 -- fgets() with file pointer pointing at EOF --
229 -- fgets() with file pointer pointing at EOF --
237 -- Testing fgets() with file opened using mode a+t --
239 -- fgets() with file pointer pointing at EOF --
247 -- fgets() with file pointer pointing at EOF --
255 -- fgets() with file pointer pointing at EOF --
263 -- fgets() with file pointer pointing at EOF --
271 -- Testing fgets() with file opened using mode x+ --
273 -- fgets() with file pointer pointing at EOF --
281 -- fgets() with file pointer pointing at EOF --
289 -- fgets() with file pointer pointing at EOF --
297 -- fgets() with file pointer pointing at EOF --
305 -- Testing fgets() with file opened using mode x+b --
307 -- fgets() with file pointer pointing at EOF --
315 -- fgets() with file pointer pointing at EOF --
323 -- fgets() with file pointer pointing at EOF --
331 -- fgets() with file pointer pointing at EOF --
339 -- Testing fgets() with file opened using mode x+t --
341 -- fgets() with file pointer pointing at EOF --
349 -- fgets() with file pointer pointing at EOF --
357 -- fgets() with file pointer pointing at EOF --
365 -- fgets() with file pointer pointing at EOF --