Lines Matching refs:file

2 Test fgetss() function : usage variations - read/write modes, file pointer at EOF
15 Description: Gets line from file pointer and strip HTML tags
44 /* try reading the file opened in different modes of reading */
48 echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
50 /* create an empty file and write the strings with tags */
52 fwrite($file_handle,$string_with_tags); //writing data to the file
54 echo "Error: failed to open file $filename!\n";
57 // rewind the file pointer to beginning of the file
63 echo "-- Reading when file pointer points to EOF --\n";
64 var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
65 var_dump( ftell($file_handle) ); //ensure file pointer at end
67 var_dump( ftell($file_handle) ); // find out file position
68 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
70 // now file is at the end try reading with length and allowable tags,expecting false
72 var_dump( ftell($file_handle) ); // find out file position
73 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
76 // close the file
79 // delete the file
88 -- Testing fgetss() with file opened using w+ mode --
93 -- Reading when file pointer points to EOF --
103 -- Testing fgetss() with file opened using w+b mode --
108 -- Reading when file pointer points to EOF --
118 -- Testing fgetss() with file opened using w+t mode --
123 -- Reading when file pointer points to EOF --
133 -- Testing fgetss() with file opened using a+ mode --
138 -- Reading when file pointer points to EOF --
148 -- Testing fgetss() with file opened using a+b mode --
153 -- Reading when file pointer points to EOF --
163 -- Testing fgetss() with file opened using a+t mode --
168 -- Reading when file pointer points to EOF --
178 -- Testing fgetss() with file opened using x+ mode --
183 -- Reading when file pointer points to EOF --
193 -- Testing fgetss() with file opened using x+b mode --
198 -- Reading when file pointer points to EOF --
208 -- Testing fgetss() with file opened using x+t mode --
213 -- Reading when file pointer points to EOF --