/PHP-7.3/ext/spl/tests/ |
H A D | fileobject_getsize_basic.phpt | 10 $file = __DIR__ ."/data.txt"; 11 file_put_contents($file, "foobar"); 13 $s = new SplFileObject( $file ); 18 $file = __DIR__ ."/data.txt"; 19 unlink($file);
|
/PHP-7.3/ext/standard/tests/file/ |
H A D | fgetcsv_variation23.phpt | 2 Test fgetcsv() : usage variations - empty file 7 Description: Gets line from file pointer and parse for CSV fields 10 /* Testing fgetcsv() to read from an empty file */ 12 echo "*** Testing fgetcsv() : reading from file which is having zero content ***\n"; 14 // try reading from file which is having zero content 15 // create the file and then open in read mode and try reading 21 echo "Error: failed to create file $filename!\n"; 33 // close and delete the file 39 *** Testing fgetcsv() : reading from file which is having zero content ***
|
H A D | fgetcsv_variation17.phpt | 45 echo "Error: failed to create file $filename!\n"; 58 // else rewind the file pointer to beginning of the file 63 // rewind the file pointer to bof 74 // check the file pointer position and if eof 80 // check the file pointer position and if eof 84 // close the file 86 //delete file 96 -- Testing fgetcsv() with file opened using r mode -- 112 -- Testing fgetcsv() with file opened using rb mode -- 128 -- Testing fgetcsv() with file opened using rt mode -- [all …]
|
H A D | file_variation8.phpt | 2 Test file function : variation - various absolute and relative paths 7 /* Prototype : array file(string filename [, int flags[, resource context]]) 8 * Description: Read entire file into an array 9 * Source code: ext/standard/file.c 13 echo "*** Testing file() : variation ***\n"; 52 var_dump(file($dir."/".$filename)); 63 *** Testing file() : variation *** 91 Warning: file(%sfileVar8.dir/fileVar8Sub/..///fileVar8Sub//..//../fileVar8Sub/FileGetContentsVar7.t… 96 Warning: file(%sfileVar8.dir/fileVar8Sub/BADDIR/FileGetContentsVar7.tmp): failed to open stream: No… 125 Warning: file(BADDIR/FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
|
H A D | userwrapper.phpt | 6 function unlink($file) { 7 print "Unlinking file: $file\n"; 23 /* By printing out a notice that we are actively stating the file 26 print "Stating file: $path\n"; 36 unlink('test://example.com/path/to/file'); 42 print_r(stat('test://example.com/path/to/file')); 43 echo "Filesize = " . filesize('test://example.com/path/to/file') . "\n"; 44 echo "filemtime = " . filemtime('test://example.com/path/to/file') . "\n"; 47 Unlinking file: test://example.com/path/to/file 51 Stating file: test://example.com/path/to/file
|
H A D | fscanf_variation54.phpt | 8 Description: Parses input from a file according to a format 11 /* Test fscanf() to scan a file to read objects */ 15 echo "*** Test fscanf(): to read objects from a file ***\n"; 30 // create a file 34 exit("Error:failed to open file $filename"); 35 //writing object to the file 38 //closing the file 46 // opening file for read 49 exit("Error:failed to open file $filename"); 68 *** Test fscanf(): to read objects from a file ***
|
H A D | fgetcsv_variation6.phpt | 50 echo "Error: failed to create file $filename!\n"; 64 // else rewind the file pointer to beginning of the file 69 // rewind the file pointer to bof 80 // check the file pointer position and if eof 85 // check the file pointer position and if eof 89 // close the file 91 //delete file 101 -- Testing fgetcsv() with file opened using r mode -- 117 -- Testing fgetcsv() with file opened using rb mode -- 133 -- Testing fgetcsv() with file opened using rt mode -- [all …]
|
H A D | fgetcsv_variation19.phpt | 46 echo "Error: failed to create file $filename!\n"; 59 // else rewind the file pointer to beginning of the file 64 // rewind the file pointer to bof 76 // check the file pointer position and if eof 80 // close the file 82 //delete file 92 -- Testing fgetcsv() with file opened using r mode -- 102 -- Testing fgetcsv() with file opened using rb mode -- 112 -- Testing fgetcsv() with file opened using rt mode -- 122 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | bug53848.phpt | 5 $file = dirname(__FILE__) . "/bug39538.csv"; 6 @unlink($file); 7 file_put_contents($file, "a,b\n c, d"); 8 $fp = fopen($file, "r"); 11 @unlink($file);
|
H A D | copy_variation11.phpt | 6 Description: Makes a copy of the file source to dest. 14 echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; 15 $file = $file_path."/copy_variation11.tmp"; 16 $file_handle = fopen($file, "w"); 24 var_dump( filesize($file) ); //size of source before copy 31 var_dump( copy($file, $dir) ); //expected: bool(false) 33 var_dump( file_exists($file) ); //expected: bool(true) 36 var_dump( is_file($file) ); //expected: bool(true) 37 var_dump( is_dir($file) ); //expected: bool(false) 42 var_dump( filesize($file) ); //size of source after copy [all …]
|
H A D | file_variation3.phpt | 2 Test file() function : second parameter variation 7 /* Prototype : array file(string filename [, int flags[, resource context]]) 8 * Description: Read entire file into an array 9 * Source code: ext/standard/file.c 13 echo "*** Testing file() : usage variation ***\n"; 109 var_dump( file($filename, $value, $context) ); 117 *** Testing file() : usage variation *** 130 Error: 2 - file(): '-10' flag is not supported, %s(%d) 134 Error: 2 - file(): '%i' flag is not supported, %s(%d) 138 Error: 2 - file(): '%i' flag is not supported, %s(%d) [all …]
|
H A D | file_get_contents_basic.phpt | 10 * Description: Reads entire file into a string 14 include($file_path."/file.inc"); 18 echo "-- Testing with simple valid data file --\n"; 21 create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte"); 25 echo "\n-- Testing with empty file --\n"; 27 create_files($file_path, 1, "empty", 0755, 100, "w", "file", 1, "byte"); 35 -- Testing with simple valid data file -- 38 -- Testing with empty file --
|
H A D | fopen_variation6.phpt | 2 Test fopen() function : variation: use include path and stream context relative/absolute file 8 * Description: Open a file or a URL and return a file pointer 9 * Source code: ext/standard/file.c 18 fwrite($h, "This is an absolute file"); 22 fwrite($h, "This is a relative file"); 42 This is an absolute file 43 This is a relative file
|
H A D | file_variation8-win32.phpt | 2 Test file() function : variation - various absolute and relative paths 12 /* Prototype : array file(string filename [, int flags[, resource context]]) 13 * Description: Read entire file into an array 14 * Source code: ext/standard/file.c 18 echo "*** Testing file() : variation ***\n"; 60 var_dump(file($dir."\\".$filename)); 71 *** Testing file() : variation *** 99 Warning: file(%sfileVar8.dir\fileVar8Sub\..\\\fileVar8Sub\\..\\..\fileVar8Sub\FileGetContentsVar7.t… 104 Warning: file(%sfileVar8.dir\fileVar8Sub\BADDIR\FileGetContentsVar7.tmp): failed to open stream: No… 133 Warning: file(BADDIR\FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
|
/PHP-7.3/ext/standard/tests/image/ |
H A D | getimagesize_246x247.phpt | 13 while (($file = readdir($dir)) !== FALSE) { 14 if (preg_match('/^246x247\./',$file)) { 15 $files[] = $file; 20 foreach($files as $file) { 21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
|
H A D | getimagesize_384x385.phpt | 13 while (($file = readdir($dir)) !== FALSE) { 14 if (preg_match('/^384x385\./',$file)) { 15 $files[] = $file; 20 foreach($files as $file) { 21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
|
/PHP-7.3/ext/zlib/tests/ |
H A D | gzopen_variation4.phpt | 12 * Description: Open a .gz-file and return a .gz-file pointer 49 // should read dir2 file 55 //create a file in dir1 60 //should now read dir1 file 111 This is a file in dir2 112 This is a file in dir1 113 This is a file in dir1 115 This is a file in script dir 155 This is a file in dir2 156 This is a file in dir1 [all …]
|
H A D | gzopen_variation8.phpt | 2 Test gzopen() function : variation: opening a plain file 12 * Description: Open a .gz-file and return a .gz-file pointer 25 $file = "gzopen_variation8.tmp"; 26 $h = fopen($file, 'w'); 30 $h = gzopen($file, 'r'); 34 unlink($file);
|
/PHP-7.3/ext/standard/tests/file/windows_mb_path/ |
H A D | bug75063_cp1251.phpt | 2 Bug #75063 Many filesystem-related functions do not work with multibyte file names, cp1251 17 /* This file is in cp1251. */ 42 while ((\$file = readdir(\$dh)) !== false) { 43 if ("." == \$file || ".." == \$file) continue; 44 var_dump(\$file); 62 foreach ($obj as $file) { 63 if ("." == $file || ".." == $file) continue; 64 unlink($d0 . DIRECTORY_SEPARATOR . $file);
|
/PHP-7.3/ext/dba/ |
H A D | dba_cdb.c | 52 php_stream *file; member 55 int file; member 64 php_stream* file = 0; in DBA_OPEN_FUNC() local 67 int file = 0; in DBA_OPEN_FUNC() 76 file = info->fp; in DBA_OPEN_FUNC() 79 if (file < 0) { in DBA_OPEN_FUNC() 88 file = info->fp; in DBA_OPEN_FUNC() 107 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC() 111 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC() 113 cdb->file = file; in DBA_OPEN_FUNC() [all …]
|
/PHP-7.3/ext/standard/tests/dir/ |
H A D | readdir_variation6-win32-mb.phpt | 23 // include the file.inc for Function: function create_files() 24 include( dirname(__FILE__)."/../file/file.inc"); 41 while (FALSE !== ($file = readdir($dir_handle1))) { 42 $a[] = $file; 45 foreach ($a as $file) { 46 var_dump($file); 51 while (FALSE !== ($file = readdir())) { 52 $a[] = $file; 55 foreach ($a as $file) { 56 var_dump($file);
|
H A D | readdir_variation6.phpt | 17 // include the file.inc for Function: function create_files() 18 include( dirname(__FILE__)."/../file/file.inc"); 35 while (FALSE !== ($file = readdir($dir_handle1))) { 36 $a[] = $file; 39 foreach ($a as $file) { 40 var_dump($file); 45 while (FALSE !== ($file = readdir())) { 46 $a[] = $file; 49 foreach ($a as $file) { 50 var_dump($file);
|
H A D | closedir_variation3.phpt | 2 Test closedir() function : usage variations - close a file pointer 12 * Create a file pointer using fopen() then try to close it using closedir() 17 echo "\n-- Open a file using fopen() --\n"; 20 echo "\n-- Try to close the file pointer using closedir() --\n"; 23 echo "\n-- Check file pointer: --\n"; 34 -- Open a file using fopen() -- 37 -- Try to close the file pointer using closedir() -- 42 -- Check file pointer: --
|
/PHP-7.3/ext/mysqli/tests/ |
H A D | local_infile_tools.inc | 3 function shutdown_clean($file) { 4 if ($file) { 5 unlink($file); 28 if (!$file) { 51 // create a CVS file 53 if (!$fp = fopen($file, 'w')) { 55 printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file); 66 printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file); 72 if (!chmod($file, 0644)) { 75 $offset, $file); [all …]
|
/PHP-7.3/sapi/cgi/tests/ |
H A D | 002.phpt | 14 $file = dirname(__FILE__)."/002.test.php"; 16 file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>'); 18 var_dump(`$php -n -d max_execution_time=111 $file`); 19 var_dump(`$php -n -d max_execution_time=500 $file`); 20 var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`); 22 file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); var_dump(ini_get("upload_t… 24 var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 $file`); 26 unlink($file);
|