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
41 /* try reading the file opened in different modes of reading */
45 echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
47 /* create an empty file and write the strings with tags */
49 fwrite($file_handle,$string_with_tags); //writing data to the file
51 echo "Error: failed to open file $filename!\n";
54 // rewind the file pointer to beginning of the file
60 echo "-- Reading when file pointer points to EOF --\n";
61 var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
62 var_dump( ftell($file_handle) ); //ensure file pointer at end
64 var_dump( ftell($file_handle) ); // find out file position
65 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
67 // now file is at the end try reading with length and allowable tags,expecting false
69 var_dump( ftell($file_handle) ); // find out file position
70 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
73 // close the file
76 // delete the file
85 -- Testing fgetss() with file opened using w+ mode --
90 -- Reading when file pointer points to EOF --
100 -- Testing fgetss() with file opened using w+b mode --
105 -- Reading when file pointer points to EOF --
115 -- Testing fgetss() with file opened using w+t mode --
120 -- Reading when file pointer points to EOF --
130 -- Testing fgetss() with file opened using a+ mode --
135 -- Reading when file pointer points to EOF --
145 -- Testing fgetss() with file opened using a+b mode --
150 -- Reading when file pointer points to EOF --
160 -- Testing fgetss() with file opened using a+t mode --
165 -- Reading when file pointer points to EOF --
175 -- Testing fgetss() with file opened using x+ mode --
180 -- Reading when file pointer points to EOF --
190 -- Testing fgetss() with file opened using x+b mode --
195 -- Reading when file pointer points to EOF --
205 -- Testing fgetss() with file opened using x+t mode --
210 -- Reading when file pointer points to EOF --