/PHP-7.1/ext/standard/tests/file/ |
H A D | unlink_variation2-win32.phpt | 2 Test unlink() function : usage variations - unlink file in use 15 /* Try to unlink file when file handle is still in use */ 19 echo "*** Testing unlink() on a file when file handle is open ***\n"; 20 // temp file name used here 23 // create file 26 var_dump( unlink($filename) ); // expected: false as file handle is still open 27 // now close file handle 30 // now unlink file 32 var_dump( file_exists($filename) ); // confirm file is deleted 37 *** Testing unlink() on a file when file handle is open ***
|
H A D | fgets_variation6-win32.phpt | 13 Description: Gets a line from file pointer 16 // include the file.inc for common test funcitons 17 include ("file.inc"); 45 // seek to end of the file and try fgets() 54 //close file 57 // delete file 69 -- fgets() with file pointer pointing at EOF -- 77 -- fgets() with file pointer pointing at EOF -- 85 -- fgets() with file pointer pointing at EOF -- 93 -- fgets() with file pointer pointing at EOF -- [all …]
|
H A D | fgets_variation6.phpt | 13 Description: Gets a line from file pointer 16 // include the file.inc for common test funcitons 17 include ("file.inc"); 45 // seek to end of the file and try fgets() 54 //close file 57 // delete file 69 -- fgets() with file pointer pointing at EOF -- 77 -- fgets() with file pointer pointing at EOF -- 85 -- fgets() with file pointer pointing at EOF -- 93 -- fgets() with file pointer pointing at EOF -- [all …]
|
H A D | fgetcsv_variation2.phpt | 47 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 78 // check the file pointer position and if eof 82 // close the file 84 //delete file 94 -- Testing fgetcsv() with file opened using r mode -- 104 -- Testing fgetcsv() with file opened using rb mode -- 114 -- Testing fgetcsv() with file opened using rt mode -- 124 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation1.phpt | 47 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 77 // check the file pointer position and if eof 81 // close the file 83 //delete file 93 -- Testing fgetcsv() with file opened using r mode -- 103 -- Testing fgetcsv() with file opened using rb mode -- 113 -- Testing fgetcsv() with file opened using rt mode -- 123 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation7.phpt | 47 echo "Error: failed to create file $filename!\n"; 61 // else rewind the file pointer to beginning of the file 66 // rewind the file pointer to bof 77 // check the file pointer position and if eof 81 // close the file 83 //delete file 93 -- Testing fgetcsv() with file opened using r mode -- 103 -- Testing fgetcsv() with file opened using rb mode -- 113 -- Testing fgetcsv() with file opened using rt mode -- 123 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | file_variation7.phpt | 2 file() on a file with blank lines 11 echo "file():\n"; 12 var_dump(file($filepath)); 15 var_dump(file($filepath, FILE_IGNORE_NEW_LINES)); 18 var_dump(file($filepath, FILE_SKIP_EMPTY_LINES)); 21 var_dump(file($filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)); 27 file(): 45 file() with FILE_IGNORE_NEW_LINES: 59 file() with FILE_SKIP_EMPTY_LINES: 77 file() with FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES:
|
H A D | symlink_link_linkinfo_is_link_variation3.phpt | 24 /* Variation 3 : Create file and a soft link to the file 35 // create temp file 36 $file = fopen($filename, "w"); 38 // create soft link to file 45 // fill data into file 47 fclose($file); 88 // write to temp file 89 $file = fopen($filename, "w"); 90 fwrite($file, "Hello World"); 91 fclose($file); [all …]
|
H A D | 001-win32-mb.phpt | 15 $fname = 'test_私はガラスを食べられます.file'; 65 if (is_dir('../file')) { 66 echo "../file is a directory\n"; 90 test_私はガラスを食べられます.file exists 92 test_私はガラスを食べられます.file exists 93 test_私はガラスを食べられます.file is file 95 test_私はガラスを食べられます.file size is 0 96 test_私はガラスを食べられます.file is writeable 97 test_私はガラスを食べられます.file is readable 98 test_私はガラスを食べられます.file is a regular file [all …]
|
H A D | copy_variation10.phpt | 6 Description: Makes a copy of the file source to dest. 10 /* Test copy(): Try copying source file to desntination file, where destination file name is identi… 14 echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; 15 $file = $file_path."/copy_variation10.tmp"; 16 $file_handle = fopen($file, "w"); 20 var_dump( copy($file, $file) ); 21 var_dump( file_exists($file) ); 22 var_dump( filesize($file) ); 31 *** Test copy(): Trying to create a copy of file with the same source name ***
|
H A D | fflush_variation4.phpt | 2 Test fflush() function: usage variations - file opened in read-only mode 6 Description: Flushes the output to a file 12 require $file_path.'/file.inc'; 22 echo "-- Iteration $count with file opened in $mode mode --\n"; 24 // creating a file 27 exit("Error:failed to open file $file_name"); 30 // opening the file in different read modes 33 exit("Error:failed to open file $file_name"); 45 -- Iteration 1 with file opened in r mode -- 47 -- Iteration 2 with file opened in rb mode -- [all …]
|
H A D | basename_bug66395-win32.phpt | 7 echo basename("c:file.txt") . "\n"; 8 echo basename("d:subdir\\file.txt") . "\n"; 9 echo basename("y:file.txt", ".txt") . "\n"; 10 echo basename("notdriveletter:file.txt") . "\n"; 14 file.txt 15 file.txt 16 file 17 notdriveletter:file.txt
|
H A D | fgetss_variation4.phpt | 15 // include the common file related test functions 16 include ("file.inc"); 50 // rewind the file pointer to beginning of the file 68 // close the file 70 // delete the file 84 -- Reading when file pointer points to EOF -- 99 -- Reading when file pointer points to EOF -- 114 -- Reading when file pointer points to EOF -- 129 -- Reading when file pointer points to EOF -- 144 -- Reading when file pointer points to EOF -- [all …]
|
H A D | fopen_variation10-win32.phpt | 18 * Description: Open a file or a URL and return a file pointer 50 $thirdfile = 'c:\\'.$file; 91 file in root 94 file in root 99 file not opened for read 106 file not opened for read 113 file not opened for read 123 file not opened for read 128 file in root 140 file in fopen10.tmpDir [all …]
|
H A D | fopen_variation11-win32.phpt | 17 * Description: Open a file or a URL and return a file pointer 49 $thirdfile = 'c:\\'.$file; 89 file in root 92 file in root 97 file not opened for read 104 file not opened for read 111 file not opened for read 121 file not opened for read 126 file in root 138 file in fopen11.tmpDir [all …]
|
H A D | ftruncate_variation4-win32.phpt | 13 Description: Truncates a file to a given length 16 // include common file related test functions 17 include ("file.inc"); 21 /* test ftruncate with file opened in different modes */ 35 // create 1 file with some contents 38 // fopen the file using the $file_modes 43 // fopen the file using the $file_modes 47 echo "Error: failed to open file $filename!\n"; 51 rewind($file_handle); // file pointer to 0 76 -- Testing ftruncate() with file opening using r mode -- [all …]
|
H A D | ftruncate_variation4.phpt | 13 Description: Truncates a file to a given length 16 // include common file related test functions 17 include ("file.inc"); 21 /* test ftruncate with file opened in different modes */ 35 // create 1 file with some contents 38 // fopen the file using the $file_modes 43 // fopen the file using the $file_modes 47 echo "Error: failed to open file $filename!\n"; 51 rewind($file_handle); // file pointer to 0 76 -- Testing ftruncate() with file opening using r mode -- [all …]
|
/PHP-7.1/ext/spl/tests/ |
H A D | SplFileObject_fwrite_variation_001.phpt | 5 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt'; 6 if(file_exists($file)) { 7 unlink($file); 9 $obj = New SplFileObject($file,'w'); 11 var_dump(file_get_contents($file)); 15 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt'; 16 if(file_exists($file)) { 17 unlink($file);
|
H A D | SplFileObject_fwrite_variation_002.phpt | 5 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt'; 6 if(file_exists($file)) { 7 unlink($file); 9 $obj = New SplFileObject($file,'w'); 11 var_dump(file_get_contents($file)); 15 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt'; 16 if(file_exists($file)) { 17 unlink($file);
|
/PHP-7.1/ext/curl/tests/ |
H A D | bug27023.phpt | 14 curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file"); 17 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt'); 18 $params = array('file' => $file); 22 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain"); 23 $params = array('file' => $file); 27 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt"); 28 $params = array('file' => $file); 32 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt"); 33 $params = array('file' => $file);
|
/PHP-7.1/ext/pdo_mysql/tests/ |
H A D | pdo_mysql___construct_uri-win32.phpt | 20 $file = $tmp . DIRECTORY_SEPARATOR . 'pdomuri.tst'; 24 $uri = sprintf('uri:file:%s', $file); 26 if ($fp = @fopen($file, 'w')) { 27 // ok, great we can create a file with a DSN in it 31 assert(file_exists($file)); 37 $file, filesize($file), file_get_contents($file), 40 unlink($file); 43 if ($fp = @fopen($file, 'w')) { 48 assert(file_exists($file)); 54 $file, filesize($file), file_get_contents($file), [all …]
|
/PHP-7.1/tests/security/ |
H A D | open_basedir_file.phpt | 9 test_open_basedir_before("file"); 10 test_open_basedir_error("file"); 12 var_dump(file("ok.txt")); 13 var_dump(file("../ok/ok.txt")); 14 var_dump(file($initdir."/test/ok/ok.txt")); 15 var_dump(file($initdir."/test/ok/../ok/ok.txt")); 17 test_open_basedir_after("file"); 25 *** Testing open_basedir configuration [file] *** 44 Warning: file(..): failed to open stream: %s in %s on line %d 54 Warning: file(/): failed to open stream: %s in %s on line %d [all …]
|
/PHP-7.1/ext/gd/tests/ |
H A D | 001-mb.phpt | 2 imagecreatefrompng() and empty/missing file 8 $file = dirname(__FILE__)."/001私はガラスを食べられます.test"; 9 @unlink($file); 11 var_dump(imagecreatefrompng($file)); 12 touch($file); 13 var_dump(imagecreatefrompng($file)); 15 @unlink($file); 20 Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): failed to open stream: No such file or directo… 23 Warning: imagecreatefrompng(): '%s001私はガラスを食べられます.test' is not a valid PNG file in %s on line %d
|
H A D | 001.phpt | 2 imagecreatefrompng() and empty/missing file 8 $file = dirname(__FILE__)."/001.test"; 9 @unlink($file); 11 var_dump(imagecreatefrompng($file)); 12 touch($file); 13 var_dump(imagecreatefrompng($file)); 15 @unlink($file); 20 Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on … 23 Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
|
/PHP-7.1/ext/zlib/tests/ |
H A D | gzfile_variation15.phpt | 33 gzwrite($h, "This is a file in dir2"); 36 // should read dir2 file 40 //create a file in dir1 42 gzwrite($h, "This is a file in dir1"); 45 //should now read dir1 file 49 // create a file in working directory 54 //should still read dir1 file 70 //should read the file in script dir 85 string(22) "This is a file in dir2" 90 string(22) "This is a file in dir1" [all …]
|