Home
last modified time | relevance | path

Searched refs:file (Results 351 – 375 of 2191) sorted by relevance

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

/PHP-7.1/ext/spl/tests/
H A Dbug45216.phpt8 $file = dirname(__FILE__) . '/foo.html';
9 file_put_contents($file, 'text 0<div class="tested">text 1</div>');
10 $handle = fopen($file, 'r');
12 $object = new SplFileObject($file);
H A DSplFileObject_fputcsv.phpt5 $file = __DIR__ . '/SplFileObject_fputcsv.csv';
6 $fo = new SplFileObject($file, 'w');
36 $res = file($file);
43 $fp = fopen($file, "r");
58 $file = __DIR__ . '/SplFileObject_fputcsv.csv';
59 unlink($file);
/PHP-7.1/ext/standard/tests/file/
H A Dbug24482.phpt13 chdir(__DIR__); // ensure in ext/standard/tests/file
20 while (is_string($file = readdir($dh))) {
21 if ($file[0] === ".") continue;
22 if (!is_dir($file)) continue;
23 $dirs[] = $file;
H A Dis_file_basic.phpt6 Description: Tells whether the filename is a regular file
7 Returns TRUE if the filename exists and is a regular file
12 /* Checking with current file */
20 /* With non-existing file */
22 /* With existing file */
28 var_dump( is_bool( is_file("/no/such/file") ) );
H A Dfilesize_variation3-win32.phpt2 Test filesize() function: usage variations - file size after truncate
12 Description : Returns the size of the file in bytes, or FALSE
21 fwrite($file_handle, (binary)str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
24 echo "-- Testing filesize() after truncating the file to a new length --\n";
25 // truncate the file created earlier in subdir, the size of the file is 12000bytes
26 // truncate the same file, in the loop , each time with the decrement in size by 1200 bytes,
45 -- Testing filesize() after truncating the file to a new length --
H A Dcopy_variation15.phpt20 Description: Makes a copy of the file source to dest.
24 /* Test copy(): Trying to create a copy of file in a dir which doesn't have write permissions */
28 echo "*** Test copy() function: Trying to create a copy of file in a dir which doesn't have write p…
29 $file = $file_path."/copy_variation15.tmp";
30 $file_handle = fopen($file, "w");
43 var_dump( copy($file, $dir."/copy_copy_variation15.tmp") );
45 var_dump( filesize($file) ); //size of source
57 *** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permiss…
H A Dfilesize_variation3.phpt2 Test filesize() function: usage variations - file size after truncate
12 Description : Returns the size of the file in bytes, or FALSE
21 fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
24 echo "-- Testing filesize() after truncating the file to a new length --\n";
25 // truncate the file created earlier in subdir, the size of the file is 12000bytes
26 // truncate the same file, in the loop , each time with the decrement in size by 1200 bytes,
45 -- Testing filesize() after truncating the file to a new length --
H A Dfopen_variation5.phpt8 * Description: Open a file or a URL and return a file pointer
9 * Source code: ext/standard/file.c
64 // create a file in the middle directory
70 // should read dir2 file
76 //create a file in dir1
81 //should now read dir1 file
87 // create a file in working directory
92 //should still read dir1 file
101 //should read the file in working dir
107 // create a file in the script directory
[all …]
H A Dfopen_variation8.phpt8 * Description: Open a file or a URL and return a file pointer
9 * Source code: ext/standard/file.c
63 // create a file in the middle directory
69 // should read dir2 file
75 //create a file in dir1
80 //should now read dir1 file
86 // create a file in working directory
91 //should read the dir1 file
100 //should read the working dir file
106 // create a file in the script directory
[all …]
H A Dfscanf_variation52.phpt2 Test fscanf() function: usage variations - empty file
8 Description: Parses input from a file according to a format
11 /* Test fscanf() to scan an empty file */
15 echo "*** Test fscanf(): to read an empty file ***\n";
29 // reading the values from file using different integer formats
32 // create an empty file
36 exit("Error:failed to open file $filename");
37 //closing the file
40 // opening file in $mode mode
43 exit("Error:failed to open file $filename");
[all …]
H A Dfeof_basic.phpt8 * Description: Test for end-of-file on a file pointer
9 * Source code: ext/standard/file.c
22 echo "\n*** testing reading complete file using feof to stop ***\n";
25 //feof is not set to true until you try to read past the end of file.
26 //so fgets will be called even if we are at the end of the file on
46 echo "*** testing feof on unclosed file after a read ***\n";
65 echo "*** closing file, testing eof ***\n";
76 *** testing reading complete file using feof to stop ***
90 *** testing feof on unclosed file after a read ***
98 *** closing file, testing eof ***
H A Dfgetcsv_variation24.phpt48 echo "Error: failed to create file $filename!\n";
62 // else rewind the file pointer to beginning of the file
67 // rewind the file pointer to bof
80 // check the file pointer position and if eof
84 // close the file
86 //delete file
96 -- Testing fgetcsv() with file opened using w+ mode --
108 -- Testing fgetcsv() with file opened using w+b mode --
132 -- Testing fgetcsv() with file opened using x+ mode --
168 -- Testing fgetcsv() with file opened using w+ mode --
[all …]
H A Dfputcsv_variation15.phpt31 $file = dirname(__FILE__) . 'fgetcsv.csv';
32 @unlink($file);
34 $fp = fopen($file, "w");
40 $res = file($file);
47 $fp = fopen($file, "r");
57 @unlink($file);
H A Dfputcsv_002.phpt6 $file = dirname(__FILE__) .'/fgetcsv-test.csv';
10 $fp = fopen($file, 'w');
19 $file = dirname(__FILE__) .'/fgetcsv-test.csv';
20 unlink($file);
/PHP-7.1/main/streams/
H A Dphp_stream_plain_wrapper.h36 PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STREAMS_DC);
37 #define php_stream_fopen_from_file(file, mode) _php_stream_fopen_from_file((file), (mode) STREAMS_C… argument
42 PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STREAMS_DC);
43 #define php_stream_fopen_from_pipe(file, mode) _php_stream_fopen_from_pipe((file), (mode) STREAMS_C… argument
/PHP-7.1/ext/mysqli/tests/
H A Dmysqli_debug_append.phpt2 mysqli_debug() - append to trace file
29 // the debug file should have entries
35 printf("[002] Trace file '%s' has not been created\n", $trace_file);
37 printf("[003] Trace file '%s' is very small. filesize() reports only %d bytes. Please check.\n",
41 // will mysqli_debug() mind if the trace file gets removed?
46 printf("[004] Cannot create trace file to test append mode\n");
50 printf("[005] Cannot write to trace file.\n");
63 …printf("[008] Cannot find original file content any more. Seems that the trace file got overwritte…
74 …printf("[011] Cannot find original file content any more. Seems that the trace file got overwritte…
81 printf("[012] Could not remove trace file '%s'.\n", $trace_file);
/PHP-7.1/ext/phar/tests/tar/
H A Dtar_003.phpt18 $tar->addFile('.phar/stub.php', "<?php // tar-based phar archive stub file\n__HALT_COMPILER();");
20 $tar->addFile('internal/file/here', "hi there!\n");
27 echo file_get_contents($alias . '/internal/file/here');
36 echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n");
45 echo (is_file($alias . '/' . $v) ? "file\n" : "dir\n");
62 file
69 file
/PHP-7.1/ext/dba/tests/
H A Ddba007.phpt16 echo "database file created\n";
21 echo "database file created\n";
26 echo "database file created\n";
42 database file created
43 database file created
44 database file created
H A Ddba_db4_009.phpt17 echo "database file created\n";
22 echo "database file created\n";
27 echo "database file created\n";
43 database file created
44 database file created
45 database file created
/PHP-7.1/ext/standard/tests/file/windows_links/
H A Dbug76335.phpt2 Bug #76335 "link(): Bad file descriptor" with non-ASCII path
15 $fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file";
26 var_dump(link($d0 . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "file", $l0));
29 var_dump(link($d1 . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "file", $l1));
38 $fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file";
/PHP-7.1/ext/spl/examples/
H A Dautoload.inc3 /** @file autoload.inc
17 $file = $dir . '/' . $classname . '.inc';
18 if (file_exists($file))
20 require_once($file);
32 * current directory of script or include file.
/PHP-7.1/ext/phar/tests/
H A D016b.phpt2 Phar::mapPhar invalid file (gzipped file length is too short)
12 $file = "<?php __HALT_COMPILER(); ?>";
13 // file length is too short
24 …phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line …
/PHP-7.1/ext/gd/tests/
H A Dimagewbmp-mb.phpt9 $file = dirname(__FILE__) . '/im私はガラスを食べられます.wbmp';
14 imagewbmp($im, $file);
16 $im2 = imagecreatefromwbmp($file);
27 unlink($file);
H A Dimagewbmp.phpt9 $file = dirname(__FILE__) . '/im.wbmp';
14 imagewbmp($im, $file);
16 $im2 = imagecreatefromwbmp($file);
27 unlink($file);
/PHP-7.1/ext/zip/tests/
H A Doo_addemptydir.phpt13 $file = $dirname . '__tmp_oo_addfile.zip';
15 copy($dirname . 'test.zip', $file);
18 if (!$zip->open($file)) {
29 @unlink($file);

Completed in 48 milliseconds

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