Lines Matching refs:file

2 Test fgetss() function : usage variations - read  modes, file pointer at EOF
12 Description: Gets line from file pointer and strip HTML tags
15 // include the common file related test functions
16 include ("file.inc");
35 /* try reading the file opened in different modes of reading */
39 echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
41 /* create an empty file and write the strings with tags */
42 create_file ($filename); //create an empty file
46 echo "Error: failed to open file $filename!\n";
50 // rewind the file pointer to beginning of the file
56 echo "-- Reading when file pointer points to EOF --\n";
57 var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
58 var_dump( ftell($file_handle) ); //ensure file pointer at end
60 var_dump( ftell($file_handle) ); // find out file position
61 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
63 // now file is at the end try reading with length and allowable tags,expecting false
65 var_dump( ftell($file_handle) ); // find out file position
66 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
68 // close the file
70 // delete the file
79 -- Testing fgetss() with file opened using r mode --
84 -- Reading when file pointer points to EOF --
94 -- Testing fgetss() with file opened using rb mode --
99 -- Reading when file pointer points to EOF --
109 -- Testing fgetss() with file opened using rt mode --
114 -- Reading when file pointer points to EOF --
124 -- Testing fgetss() with file opened using r+ mode --
129 -- Reading when file pointer points to EOF --
139 -- Testing fgetss() with file opened using r+b mode --
144 -- Reading when file pointer points to EOF --
154 -- Testing fgetss() with file opened using r+t mode --
159 -- Reading when file pointer points to EOF --