Lines Matching refs:file

2 Test fgetss() function : usage variations - read/write modes, file pointer at EOF 
13 Description: Gets line from file pointer and strip HTML tags
42 /* try reading the file opened in different modes of reading */
46 echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
48 /* create an empty file and write the strings with tags */
50 fwrite($file_handle,$string_with_tags); //writing data to the file
52 echo "Error: failed to open file $filename!\n";
55 // rewind the file pointer to beginning of the file
61 echo "-- Reading when file pointer points to EOF --\n";
62 var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
63 var_dump( ftell($file_handle) ); //ensure file pointer at end
65 var_dump( ftell($file_handle) ); // find out file position
66 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
68 // now file is at the end try reading with length and allowable tags,expecting false
70 var_dump( ftell($file_handle) ); // find out file position
71 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
74 // close the file
77 // delete the file
86 -- Testing fgetss() with file opened using w+ mode --
91 -- Reading when file pointer points to EOF --
101 -- Testing fgetss() with file opened using w+b mode --
106 -- Reading when file pointer points to EOF --
116 -- Testing fgetss() with file opened using w+t mode --
121 -- Reading when file pointer points to EOF --
131 -- Testing fgetss() with file opened using a+ mode --
136 -- Reading when file pointer points to EOF --
146 -- Testing fgetss() with file opened using a+b mode --
151 -- Reading when file pointer points to EOF --
161 -- Testing fgetss() with file opened using a+t mode --
166 -- Reading when file pointer points to EOF --
176 -- Testing fgetss() with file opened using x+ mode --
181 -- Reading when file pointer points to EOF --
191 -- Testing fgetss() with file opened using x+b mode --
196 -- Reading when file pointer points to EOF --
206 -- Testing fgetss() with file opened using x+t mode --
211 -- Reading when file pointer points to EOF --