Lines Matching refs:file

2 Test fgetss() function : usage variations - read  modes, file pointer at EOF
14 Description: Gets line from file pointer and strip HTML tags
17 // include the common file related test functions
18 include ("file.inc");
37 /* try reading the file opened in different modes of reading */
41 echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n";
43 /* create an empty file and write the strings with tags */
44 create_file ($filename); //create an empty file
48 echo "Error: failed to open file $filename!\n";
52 // rewind the file pointer to beginning of the file
58 echo "-- Reading when file pointer points to EOF --\n";
59 var_dump( fseek($file_handle,0,SEEK_END) ); // now file pointer at end
60 var_dump( ftell($file_handle) ); //ensure file pointer at end
62 var_dump( ftell($file_handle) ); // find out file position
63 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
65 // now file is at the end try reading with length and allowable tags,expecting false
67 var_dump( ftell($file_handle) ); // find out file position
68 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
70 // close the file
72 // delete the file
81 -- Testing fgetss() with file opened using r mode --
86 -- Reading when file pointer points to EOF --
96 -- Testing fgetss() with file opened using rb mode --
101 -- Reading when file pointer points to EOF --
111 -- Testing fgetss() with file opened using rt mode --
116 -- Reading when file pointer points to EOF --
126 -- Testing fgetss() with file opened using r+ mode --
131 -- Reading when file pointer points to EOF --
141 -- Testing fgetss() with file opened using r+b mode --
146 -- Reading when file pointer points to EOF --
156 -- Testing fgetss() with file opened using r+t mode --
161 -- Reading when file pointer points to EOF --