/php-src/ext/standard/tests/file/ |
H A D | 007_variation13-win32.phpt | 11 /* Test fopen() and fclose(): Opening the file in "at" mode, 12 checking for the file creation, write & read operations, 13 checking for the file pointer position, 17 require($file_path."/file.inc"); 20 $file = $file_path."/007_variation13.tmp"; 24 $file_handle = fopen($file, "at"); //opening the file "at" mode 31 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 35 unlink($file); //Deleting the file 36 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created 37 var_dump( file_exists($file) ); //Check for the existence of file [all …]
|
H A D | 007_variation13.phpt | 11 /* Test fopen() and fclose(): Opening the file in "at" mode, 12 checking for the file creation, write & read operations, 13 checking for the file pointer position, 17 require($file_path."/file.inc"); 20 $file = $file_path."/007_variation13.tmp"; 24 $file_handle = fopen($file, "at"); //opening the file "at" mode 31 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 35 unlink($file); //Deleting the file 36 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created 37 var_dump( file_exists($file) ); //Check for the existence of file [all …]
|
H A D | bug45985.phpt | 2 Bug #35740 (touch() opened file raises a warning) 5 $file = __DIR__ . '/' . '__tmp_35740.dat'; 6 file_put_contents($file, 'test'); 7 $f = fopen($file, 'r'); 8 touch($file); 10 @unlink($file);
|
H A D | file_variation6.phpt | 2 file() with a range of integer flag values 13 var_dump(file($filepath, $flags)); 98 file(): Argument #2 ($flags) must be a valid flag value 99 file(): Argument #2 ($flags) must be a valid flag value 100 file(): Argument #2 ($flags) must be a valid flag value 101 file(): Argument #2 ($flags) must be a valid flag value 102 file(): Argument #2 ($flags) must be a valid flag value 103 file(): Argument #2 ($flags) must be a valid flag value 104 file(): Argument #2 ($flags) must be a valid flag value 105 file(): Argument #2 ($flags) must be a valid flag value [all …]
|
H A D | ftruncate_variation7-win32.phpt | 11 /* truncate the file when file pointer is positioned at end of the file */ 12 // include common file related test functions 13 include ("file.inc"); 17 /* test ftruncate with file opened in different modes */ 31 // create 1 file with some contents 34 // fopen the file using the $file_modes 39 // fopen the file using the $file_modes 43 echo "Error: failed to open file $filename!\n"; 47 rewind($file_handle); // file pointer to 0 72 -- Testing ftruncate() with file opening using r mode -- [all …]
|
H A D | ftruncate_variation7.phpt | 11 /* truncate the file when file pointer is positioned at end of the file */ 12 // include common file related test functions 13 include ("file.inc"); 17 /* test ftruncate with file opened in different modes */ 31 // create 1 file with some contents 34 // fopen the file using the $file_modes 39 // fopen the file using the $file_modes 43 echo "Error: failed to open file $filename!\n"; 47 rewind($file_handle); // file pointer to 0 72 -- Testing ftruncate() with file opening using r mode -- [all …]
|
H A D | unlink_basic.phpt | 8 echo "*** Testing unlink() on a file ***\n"; 9 $filename = "$file_path/unlink_basic.tmp"; // temp file name used here 10 $fp = fopen($filename, "w"); // create file 14 // delete file 16 var_dump( file_exists($filename) ); // confirm file doesn't exist 21 // temp file name used here 23 $fp = fopen($filename, "w"); // create file 26 // delete file 28 var_dump( file_exists($filename) ); // confirm file doesn't exist 33 *** Testing unlink() on a file ***
|
H A D | bug75679.phpt | 12 foreach ($Files2Report as $file => &$Report) 14 $Report = ['strlen' => strlen ($file), 'result' => 'nok']; 16 if (! is_dir (dirname ($file))) mkdir (dirname ($file), 0777, true); 17 if (copy (__FILE__, $file) && is_file ($file)) 36 foreach ($Files2Report as $file => &$Report) 38 if (is_file($file)) { 39 unlink($file); 42 $d1 = dirname($file);
|
H A D | fgetcsv_variation12.phpt | 40 echo "Error: failed to create file $filename!\n"; 55 // else rewind the file pointer to beginning of the file 60 // 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 -- 98 -- Testing fgetcsv() with file opened using rb mode -- 103 -- Testing fgetcsv() with file opened using rt mode -- 108 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | unlink_variation1-win32-mb.phpt | 2 Test unlink() function : usage variations - unlinking file in a directory 25 echo "\n*** Testing unlink() on file inside a directory ***\n"; 28 // create temp file inside $dirname 38 var_dump( file_exists($filename) ); // confirm file is deleted 48 // create the temp file 52 // remove write permission from file 55 // now try deleting temp file inside $dirname 58 // reassign write permission to temp file 60 // delete temp file 62 var_dump( file_exists($filename) ); // confirm file is deleted [all …]
|
H A D | unlink_variation1-win32.phpt | 2 Test unlink() function : usage variations - unlinking file in a directory 24 echo "\n*** Testing unlink() on file inside a directory ***\n"; 27 // create temp file inside $dirname 37 var_dump( file_exists($filename) ); // confirm file is deleted 47 // create the temp file 51 // remove write permission from file 54 // now try deleting temp file inside $dirname 57 // reassign write permission to temp file 59 // delete temp file 61 var_dump( file_exists($filename) ); // confirm file is deleted [all …]
|
H A D | fgetcsv_variation19.phpt | 41 echo "Error: failed to create file $filename!\n"; 54 // else rewind the file pointer to beginning of the file 59 // rewind the file pointer to bof 75 // check the file pointer position and if eof 79 // close the file 81 //delete file 91 -- Testing fgetcsv() with file opened using r mode -- 96 -- Testing fgetcsv() with file opened using rb mode -- 101 -- Testing fgetcsv() with file opened using rt mode -- 106 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fwrite_variation2-win32.phpt | 14 include ("file.inc"); 69 /* display the file content, check the file size */ 85 -- Opening file in r+ -- 102 -- Opening file in r+b -- 119 -- Opening file in r+t -- 138 -- Opening file in r+ -- 155 -- Opening file in r+b -- 172 -- Opening file in r+t -- 191 -- Opening file in r+ -- 208 -- Opening file in r+b -- [all …]
|
H A D | fwrite_variation2.phpt | 14 include ("file.inc"); 69 /* display the file content, check the file size */ 84 -- Opening file in r+ -- 101 -- Opening file in r+b -- 118 -- Opening file in r+t -- 137 -- Opening file in r+ -- 154 -- Opening file in r+b -- 171 -- Opening file in r+t -- 190 -- Opening file in r+ -- 207 -- Opening file in r+b -- [all …]
|
H A D | 007_variation8.phpt | 6 /* Test fopen() and fclose(): Opening the file in "x+" mode, 7 checking for the file creation, write & read operations, 8 checking for the file pointer position, 9 checking for the warning msg when trying to open an existing file in "x+" mode, 14 $file = $file_path."/007_variation8.tmp"; 17 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea… 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 24 …ump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the file 25 …ell($file_handle) ); //File pointer position after read operation, expected at the end of the file 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | stat_variation2-win32.phpt | 2 Test stat() functions: usage variations - effects of writing to file 12 /* test the effects of writing to a file on the stats of the file */ 16 require "$file_path/file.inc"; 20 $file_handle = fopen($filename, "w"); // temp file 24 echo "*** Testing stat(): writing to a file ***\n"; 26 // writing to an empty file 27 echo "-- Testing stat() on file after data is written in it --\n"; 31 $file_handle = fopen($filename, "w"); // temp file 52 *** Testing stat(): writing to a file *** 53 -- Testing stat() on file after data is written in it --
|
H A D | file_put_contents.phpt | 10 $file = __DIR__."/file_put_contents.txt"; 15 var_dump(file_put_contents($file, $context)); 19 var_dump(file_put_contents($file, new stdClass)); 20 var_dump(file_put_contents($file, new foo)); 21 $fp = fopen($file, "r"); 23 var_dump(file_put_contents($file, "string", 0, $fp)); 32 $file = __DIR__."/file_put_contents.txt"; 33 unlink($file);
|
H A D | 005_error.phpt | 10 var_dump( fileatime("/no/such/file/or/dir") ); 11 var_dump( filemtime("/no/such/file/or/dir") ); 12 var_dump( filectime("/no/such/file/or/dir") ); 13 var_dump( touch("/no/such/file/or/dir", 10) ); 21 Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d 24 Warning: filemtime(): stat failed for /no/such/file/or/dir in %s on line %d 27 Warning: filectime(): stat failed for /no/such/file/or/dir in %s on line %d 30 Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %…
|
/php-src/ext/zip/examples/ |
H A D | encryption.php | 9 $file = 'foo.php'; variable 15 $zip->addFile(__FILE__, $file); 16 $zip->setEncryptionName($file, ZipArchive::EM_AES_256, $pass); 24 $zip->addFile(__FILE__, $file); 25 $zip->setEncryptionName($file, ZipArchive::EM_AES_256); 31 print_r($zip->statName($file)); 36 $text = $zip->getFromName($file); 47 $text = file_get_contents("zip://$name#$file", false, $ctx);
|
/php-src/ext/standard/tests/general_functions/ |
H A D | bug41445.phpt | 6 $file = __DIR__."/bug41445.ini"; 16 file_put_contents($file, $data); 18 var_dump(parse_ini_file($file, TRUE)); 19 var_dump(parse_ini_file($file)); 29 file_put_contents($file, $data); 31 var_dump(parse_ini_file($file, TRUE)); 32 var_dump(parse_ini_file($file)); 34 @unlink($file);
|
/php-src/ext/standard/tests/strings/ |
H A D | md5_file.phpt | 6 /* Creating an empty file */ 10 /* Creating a data file */ 14 /* Writing into file */ 16 $content = "Add this to the file\n"; 19 echo "Cannot write to file ($filename)"; 43 /* Hexadecimal Output for Empty file as input */ 47 /* Raw Binary Output for Empty file as input */ 75 *** Hexadecimal Output for Empty file as Argument *** 78 *** Raw Binary Output for Empty file as Argument *** 81 *** Hexadecimal Output for a valid file with some contents *** [all …]
|
/php-src/Zend/tests/ |
H A D | debug_backtrace_limit.phpt | 27 [file] => %sdebug_backtrace_limit.php 41 [file] => %sdebug_backtrace_limit.php 52 [file] => %sdebug_backtrace_limit.php 66 [file] => %sdebug_backtrace_limit.php 77 [file] => %sdebug_backtrace_limit.php 88 [file] => %sdebug_backtrace_limit.php 102 [file] => %sdebug_backtrace_limit.php 113 [file] => %sdebug_backtrace_limit.php 124 [file] => %sdebug_backtrace_limit.php
|
H A D | get_resource_id.phpt | 6 $file = fopen(__FILE__, 'r'); 9 var_dump(get_resource_id($file) === (int) $file); 12 fclose($file); 13 var_dump(get_resource_id($file) === (int) $file);
|
/php-src/ext/standard/tests/dir/ |
H A D | readdir_basic.phpt | 11 // include the file.inc for Function: function create_files() 13 include(__DIR__."/../file/file.inc"); 22 while( FALSE !== ($file = readdir($dh)) ) { 23 $a[] = $file; 26 foreach($a as $file) { 27 var_dump($file); 33 while( FALSE !== ( $file = readdir() ) ) { 34 $a[] = $file; 37 foreach($a as $file) { 38 var_dump($file);
|
/php-src/ext/standard/tests/file/windows_mb_path/ |
H A D | test_readdir_mb_names.phpt | 47 echo "filename: $file : filetype: " . filetype($dirw . $file) . "\n"; 63 filename: Röd_Statistics.txt : filetype: file 64 filename: tschüß : filetype: file 66 filename: Voláçao : filetype: file 68 filename: českýtestování.inc : filetype: file 69 filename: š.txt : filetype: file 71 filename: żółć.txt : filetype: file 72 filename: Ελλάδα.txt : filetype: file 73 filename: привет : filetype: file 75 filename: テストマルチバイト・パス : filetype: file [all …]
|