/PHP-5.4/ext/standard/tests/file/ |
H A D | is_file_basic.phpt | 6 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 D | bug24482.phpt | 13 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 D | fgetcsv_variation24.phpt | 48 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 D | feof_basic.phpt | 8 * 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 D | fscanf_variation52.phpt | 2 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 D | fgetcsv_variation12.phpt | 45 echo "Error: failed to create file $filename!\n"; 60 // else rewind the file pointer to beginning of the file 65 // 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 -- 106 -- Testing fgetcsv() with file opened using rb mode -- 118 -- Testing fgetcsv() with file opened using rt mode -- 130 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fscanf_variation41.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 38 // writing to the file 43 // closing the file 46 // opening the file for reading 49 exit("Error:failed to open file $filename"); 53 // reading the values from file using different unsigned formats 55 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | fscanf_variation47.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 38 // writing to the file 43 // closing the file 46 // opening the file for reading 49 exit("Error:failed to open file $filename"); 53 // reading the values from file using different scientific formats 55 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | fscanf_variation10.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 43 // writing to the file 48 // closing the file 51 // opening the file for reading 54 exit("Error:failed to open file $filename"); 58 // reading the values from file using different formats formats 60 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | fscanf_variation29.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 43 // writing to the file 48 // closing the file 51 // opening the file for reading 54 exit("Error:failed to open file $filename"); 58 // reading the values from file using different octal formats 60 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | fscanf_variation35.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 38 // writing to the file 43 // closing the file 46 // opening the file for reading 49 exit("Error:failed to open file $filename"); 53 // reading the values from file using different hexa formats 55 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | fscanf_variation4.phpt | 8 Description: Parses input from a file according to a format 17 // create a file 21 exit("Error:failed to open file $filename"); 39 // writing to the file 44 // closing the file 47 // opening the file for reading 50 exit("Error:failed to open file $filename"); 54 // reading the values from file using different integer formats 56 // rewind the file so that for every foreach iteration the file pointer starts from bof
|
H A D | symlink_link_linkinfo_is_link_variation8.phpt | 15 Description: Tells whether the given file is a symbolic link. 26 /* creating link to a file in different dir with the same name as the file */ 28 // temp file used 35 // create temp file 39 var_dump( link($filename, $dirname."/") ); // this fails indicating file exists 44 // delete temp file 55 // create temp file 59 var_dump( symlink($filename, $dirname."/") ); // this fails indicating file exists 64 // delete temp file
|
H A D | file_get_contents_error.phpt | 9 * Description: Reads entire file into a string 15 include($file_path."/file.inc"); 17 echo "\n-- Testing with Non-existing file --\n"; 18 print( file_get_contents("/no/such/file/or/dir") ); 25 create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte"); 51 -- Testing with Non-existing file -- 53 Warning: file_get_contents(/no/such/file/or/dir): failed to open stream: No such file or directory …
|
H A D | rename_variation-win32.phpt | 12 Description: Renames a file or directory 15 require dirname(__FILE__).'/file.inc'; 26 /* Testing a file trailing slash */ 29 /* Testing file with double slashes */ 36 /* loop through each $file and rename it to rename_variation2.tmp */ 44 // ensure that file got renamed to new name 49 // unlink the file 77 Warning: unlink(%s/rename_variation2.tmp): No such file or directory in %s on line %d
|
H A D | stat_variation1-win32.phpt | 14 * Description: Gives information about a file 17 /* test the effects of rename() on stats of dir/file */ 20 require "$file_path/file.inc"; 23 /* create temp file and directory */ 26 $file_handle = fopen("$file_path/stat_variation1.tmp", "w"); // temp file 30 echo "*** Testing stat(): on file and directory ater renaming them ***\n"; 32 // renaming a file 81 *** Testing stat(): on file and directory ater renaming them ***
|
/PHP-5.4/ext/session/tests/ |
H A D | bug26862.phpt | 14 echo '<a href="file.php">link</a>'; 19 echo '<a href="file.php">link</a>'; 22 <a href="file.php?var=value">link</a><a href="file.php">link</a>
|
/PHP-5.4/ext/spl/tests/ |
H A D | bug45216.phpt | 8 $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 D | SplFileObject_fputcsv.phpt | 5 $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-5.4/ext/phar/tests/tar/ |
H A D | tar_003.phpt | 18 $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-5.4/main/streams/ |
H A D | php_stream_plain_wrapper.h | 36 PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STREAMS_DC TSRMLS_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 TSRMLS_DC); 43 #define php_stream_fopen_from_pipe(file, mode) _php_stream_fopen_from_pipe((file), (mode) STREAMS_C… argument
|
/PHP-5.4/ext/dba/tests/ |
H A D | dba007.phpt | 16 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 D | dba_db4_009.phpt | 17 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-5.4/ext/phar/tests/ |
H A D | 016b.phpt | 2 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-5.4/ext/spl/examples/ |
H A D | autoload.inc | 3 /** @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.
|