Home
last modified time | relevance | path

Searched refs:file (Results 301 – 325 of 2191) sorted by relevance

1...<<11121314151617181920>>...88

/PHP-7.1/ext/standard/tests/file/
H A Dfgetc_variation3.phpt7 Description: Gets character from file pointer
16 include ("file.inc");
18 echo "*** Testing fgetc() with file opened in write only mode ***\n";
27 echo "Error: failed to open file $filename!\n";
33 // rewind the file pointer to beginning of the file
38 // read from file
40 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed
41 var_dump( feof($file_handle) ); // check if end of file pointer is set
43 // close the file
46 // delete the file
[all …]
H A Dfscanf_variation51.phpt2 Test fscanf() function: usage variations - file opened in write only mode
8 Description: Parses input from a file according to a format
11 /* Test fscanf() to scan a file for read when file is opened inwrite only mode */
15 echo "*** Test fscanf(): to read from a file opened in write only mode ***\n";
17 // create a file
21 exit("Error:failed to open file $filename");
22 //writing data to the file
25 //closing the file
40 // reading the values from file using different integer formats
45 exit("Error:failed to open file $filename");
[all …]
H A Dfgets_variation1.phpt7 Description: Gets a line from file pointer
15 include ("file.inc");
17 echo "*** Testing fgets() with file opened in write only mode ***\n";
26 echo "Error: failed to open file $filename!\n";
32 // rewind the file pointer to beginning of the file
37 // read from file
39 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed
40 var_dump( feof($file_handle) ); // check if end of file pointer is set
42 // close the file
45 // delete the file
[all …]
H A Dfgets_variation2.phpt7 Description: Gets a line from file pointer
11 - closed file handle
12 - unset file handle
16 include ("file.inc");
21 // open the file for reading
23 // close the file
26 // read from closed file
31 // open the file for reading
33 // unset the file handle
H A Dis_file_variation4.phpt6 Description: Tells whether the filename is a regular file
7 Returns TRUE if the filename exists and is a regular file
10 /* Passing file names with different notations, using slashes, wild-card chars */
14 echo "*** Testing is_file() with different notations of file names ***\n";
23 /* Testing a file trailing slash */
26 /* Testing file with double slashes */
39 foreach($files_arr as $file) {
41 var_dump( is_file( $file_path."/".$file ) );
56 *** Testing is_file() with different notations of file names ***
H A Dlstat_stat_variation9.phpt2 Test lstat() and stat() functions: usage variations - deleting file/subdir
12 Description: Gives information about a file or symbolic link
15 Description: Gives information about a file
19 require "$file_path/file.inc";
21 /* test the effects on stats by deleting file/subdir from a dir
24 echo "*** Testing stat() for comparing stats after the deletion of subdir and file ***\n";
39 /* now delete the surdir and file and record the stat */
43 // comparing stats after the deletion of subdir and file
62 *** Testing stat() for comparing stats after the deletion of subdir and file ***
H A Dglob_variation2.phpt17 // create temp file
18 $fp = fopen("$file_path/$dir_name/file.text", "w");
36 unlink("$file_path/glob_test/file.text");
43 string(11) "./file.text"
47 string(22) "../glob_test/file.text"
51 string(19) "glob_test/file.text"
H A D005_error.phpt7 Description: Returns the time the file was last accessed, or FALSE
11 Description: Returns the time the file was last modified, or FALSE
27 var_dump( fileatime("/no/such/file/or/dir") );
28 var_dump( filemtime("/no/such/file/or/dir") );
29 var_dump( filectime("/no/such/file/or/dir") );
30 var_dump( touch("/no/such/file/or/dir", 10) );
46 var_dump( fileatime("/no/such/file/or/dir", "string") );
47 var_dump( filemtime("/no/such/file/or/dir", 100) );
48 var_dump( filectime("/no/such/file/or/dir", TRUE) );
49 var_dump( touch("/no/such/file/or/dir", 10, 100, 123) );
[all …]
H A Dis_file_variation1.phpt6 Description: Tells whether the filename is a regular file
7 Returns TRUE if the filename exists and is a regular file
10 /* Testing is_file() with file containing data, truncating its size
11 and the file created by touch() */
15 echo "-- Testing is_file() with file containing data --\n";
31 echo "\n-- Testing is_file() with an empty file --\n";
47 -- Testing is_file() with file containing data --
53 -- Testing is_file() with an empty file --
H A Dlstat_stat_variation8.phpt2 Test lstat() and stat() functions: usage variations - creating file/subdir
13 Description: Gives information about a file or symbolic link
16 Description: Gives information about a file
20 require "$file_path/file.inc";
22 /* test the effects on stats with creating file/subdir in a dir
25 /* create temp file */
29 echo "*** Testing stat() on dir after subdir and file is created in it ***\n";
57 *** Testing stat() on dir after subdir and file is created in it ***
H A Dsymlink_link_linkinfo_is_link_variation2.phpt2 …nk(), linkinfo(), link() and is_link() functions : usage variations - hardlink to non-existent file
15 Description: Tells whether the given file is a symbolic link.
24 /* Variation 2 : Create hard link to non-existent file */
32 echo "*** Creating a hard link to a non-existent file ***\n";
33 // creating hard link to non_existent file
43 *** Creating a hard link to a non-existent file ***
45 Warning: link(): No such file or directory in %s on line %d
48 Warning: linkinfo(): No such file or directory in %s on line %d
H A Dfputcsv_variation9.phpt64 //close the file
70 //delete file
80 -- file opened in r+ --
91 -- file opened in r+b --
102 -- file opened in r+t --
113 -- file opened in a+ --
124 -- file opened in a+b --
146 -- file opened in w+ --
179 -- file opened in x+ --
212 -- file opened in r+ --
[all …]
H A Dfile_get_contents_file_put_contents_basic.phpt8 * Description: Reads entire file into a string
12 * Description: Write a string to a file
16 include($file_path."/file.inc");
20 echo "-- Testing with simple valid data file --\n";
28 echo "\n-- Testing with empty file --\n";
44 -- Testing with simple valid data file --
47 -- Testing with empty file --
/PHP-7.1/scripts/dev/
H A Dcredits8 file=ext/standard/credits_$what.h
9 cat >$file <<END
18 CREDITS file instead
25 awk "$awkprog" $files | sort -f | uniq >> $file
26 echo "Updated $file"
/PHP-7.1/ext/mysqli/tests/
H A Dmysqli_pam_sha256_public_key_option_invalid.phpt51 if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
52 die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
55 die(sprintf("skip Failed to create pub key file"));
127 if (file_exists($file) && is_readable($file)) {
135 $key = file_get_contents($file);
140 printf("[002] Can't write public key file.");
147 /* empty file */
150 printf("[003] Can't write public key file.");
157 /* file does not exist */
162 printf("[001] Cannot read public key file.");
[all …]
/PHP-7.1/ext/bcmath/libbcmath/
H A Dconfig.h.in15 /* Define if you have the <lib.h> header file. */
18 /* Define if you have the <limits.h> header file. */
21 /* Define if you have the <stdarg.h> header file. */
24 /* Define if you have the <stddef.h> header file. */
27 /* Define if you have the <stdlib.h> header file. */
30 /* Define if you have the <string.h> header file. */
33 /* Define if you have the <unistd.h> header file. */
/PHP-7.1/ext/zip/tests/
H A Dbug64342_1.phpt2 Bug #64342 ZipArchive::addFile() has to check file existence (variation 2)
13 $file = $dirname . '__tmp_oo_addfile.zip';
15 copy($dirname . 'test.zip', $file);
18 if (!$zip->open($file)) {
30 @unlink($file);
H A Dbug64342_1-mb.phpt2 Bug #64342 ZipArchive::addFile() has to check file existence (variation 2)
13 $file = $dirname . '__私はガラスを食べられますtmp_oo_addfile.zip';
15 copy($dirname . 'test.zip', $file);
18 if (!$zip->open($file)) {
30 @unlink($file);
H A Doo_delete.phpt11 $file = $dirname . '__tmp_oo_delete.zip';
12 if (file_exists($file)) {
13 unlink($file);
17 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
32 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
70 if (file_exists($file)) {
71 unlink($file);
/PHP-7.1/ext/gd/tests/
H A Dbug41442.phpt24 /* file */
25 $file = dirname(__FILE__)."/bug41442.gd2";
26 imagegd2($res, $file);
27 $str2 = file_get_contents($file);
30 @unlink($file);
/PHP-7.1/ext/phar/tests/
H A Dbug69720.phpt12 foreach (new RecursiveIteratorIterator($p) as $file) {
13 // $file is a PharFileInfo class, and inherits from SplFileInfo
15 $temp= $file->getFileName() . "\n";
16 $temp.=file_get_contents($file->getPathName()) . "\n"; // display contents
17 var_dump($file->getMetadata());
27 Warning: file_get_contents(phar://%s): failed to open stream: phar error: "test.php" is not a file
/PHP-7.1/ext/spl/tests/
H A DSplFileObject_fputcsv_variation14.phpt6 /* Testing fputcsv() to write to a file when default enclosure value and delimiter
7 of two chars is provided and file is opened in read only mode */
9 echo "*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode …
21 $file = __DIR__ . '/SplFileObject_fputcsv.csv';
22 unlink($file);
25 *** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode ***
/PHP-7.1/sapi/cgi/tests/
H A Dapache_request_headers.phpt16 $file = dirname(__FILE__)."/012.test.php";
18 file_put_contents($file, '<?php print_r(apache_request_headers()); ?>');
20 passthru("$php -n $file");
25 passthru("$php -n -q $file");
28 unlink($file);
/PHP-7.1/ext/standard/tests/filters/
H A Dbug35916.phpt5 $file = dirname(__FILE__) . "/bug35916.txt";
6 @unlink($file);
31 $fp=fopen($file, "w");
36 readfile($file);
37 unlink($file);
/PHP-7.1/ext/standard/tests/streams/
H A Dstream_get_meta_data_file_variation2.phpt10 echo "Write some data to the file:\n";
18 //seek to start of file
21 echo "\n\nRead a line of the file, causing data to be buffered:\n";
26 echo "\n\nRead 20 bytes from the file:\n";
31 echo "\n\nRead entire file:\n";
44 Write some data to the file:
67 Read a line of the file, causing data to be buffered:
92 Read 20 bytes from the file:
115 Read entire file:

Completed in 32 milliseconds

1...<<11121314151617181920>>...88