/PHP-5.4/ext/standard/tests/file/ |
H A D | stat_variation8-win32.phpt | 14 * Description: Gives information about a file 17 /* test the effects of truncate() on stats of file */ 21 require "$file_path/file.inc"; 24 /* create temp file and directory */ 27 $file_handle = fopen($filename, "w"); // temp file 31 echo "\n*** Testing stat(): on file by truncating it to given size ***\n"; 33 // create temp file 42 // opening file in r/w mode 70 *** Testing stat(): on file by truncating it to given size ***
|
H A D | bug39538.phpt | 7 $file = dirname(__FILE__) . "/bug39538.csv"; 8 @unlink($file); 10 file_put_contents($file, $v); 11 print_r (fgetcsv(fopen($file, "r"), filesize($file))); 13 @unlink($file);
|
H A D | fscanf_variation53.phpt | 8 Description: Parses input from a file according to a format 11 /* Test fscanf() to read a file when file pointer is pointing to EOF */ 15 echo "*** Test fscanf(): to read a file when file pointer is pointing to EOF ***\n"; 32 // create an empty file 36 exit("Error:failed to open file $filename"); 38 //writing data to the file 44 //closing the file 47 // opening file in $mode mode 50 exit("Error:failed to open file $filename"); 57 // set the file pointer to eof [all …]
|
H A D | lstat_stat_variation1.phpt | 2 Test lstat() and stat() functions: usage variations - effects of rename() on file 12 Description: Gives information about a file or symbolic link 15 Description: Gives information about a file 18 /* test the effects of rename() on stats of file */ 21 require "$file_path/file.inc"; 23 /* create temp file */ 24 $fp = fopen("$file_path/lstat_stat_variation1.tmp", "w"); // temp file 27 // renaming a file and check stat
|
H A D | copy_basic.phpt | 6 * Description: Makes a copy of the file source to dest. 10 echo "*** Testing copy() function: to copy file from source to destination --\n"; 14 /* copying the file */ 21 echo "-- Checking whether the copy of file exists --\n"; 25 echo "-- Checking filepermissions of file and its copies --\n"; 46 *** Testing copy() function: to copy file from source to destination -- 50 -- Checking whether the copy of file exists -- 53 -- Checking filepermissions of file and its copies --
|
H A D | file_variation9.phpt | 2 Test file function : variation - test various endings of a file 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"; 29 var_dump(file($testfile)); 36 *** Testing file() : variation ***
|
H A D | filetype_error.phpt | 7 Description: Returns the type of the file. Possible values are fifo, char, 8 dir, block, link, file, and unknown. 12 /* non-existing file or dir */ 13 print( filetype("/no/such/file/dir") ); 23 print( filetype("file", "file") ); 29 Warning: filetype(): Lstat failed for /no/such/file/dir in %s on line %d
|
H A D | bug44805.phpt | 15 file_put_contents($file1, "this is file 1"); 16 file_put_contents($file2, "this is file 2"); 20 echo "reading file 2: "; 30 reading file 2: this is file 1
|
H A D | fgetc_variation3.phpt | 7 Description: Gets character from file pointer 16 include ("file.inc"); 18 echo "*** Testing fgetc() with file opened in write only mode ***\n"; 27 echo "Error: failed to open file $filename!\n"; 33 // rewind the file pointer to beginning of the file 38 // read from file 40 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed 41 var_dump( feof($file_handle) ); // check if end of file pointer is set 43 // close the file 46 // delete the file [all …]
|
H A D | fgets_variation1.phpt | 7 Description: Gets a line from file pointer 15 include ("file.inc"); 17 echo "*** Testing fgets() with file opened in write only mode ***\n"; 26 echo "Error: failed to open file $filename!\n"; 32 // rewind the file pointer to beginning of the file 37 // read from file 39 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed 40 var_dump( feof($file_handle) ); // check if end of file pointer is set 42 // close the file 45 // delete the file [all …]
|
H A D | fscanf_variation51.phpt | 2 Test fscanf() function: usage variations - file opened in write only mode 8 Description: Parses input from a file according to a format 11 /* Test fscanf() to scan a file for read when file is opened inwrite only mode */ 15 echo "*** Test fscanf(): to read from a file opened in write only mode ***\n"; 17 // create a file 21 exit("Error:failed to open file $filename"); 22 //writing data to the file 25 //closing the file 40 // reading the values from file using different integer formats 45 exit("Error:failed to open file $filename"); [all …]
|
H A D | unlink_variation6.phpt | 8 * Description: Delete a file 9 * Source code: ext/standard/file.c 26 function f_exists($file) { 27 if (file_exists($file) == true) { 28 echo "$file exists\n"; 31 echo "$file doesn't exist\n";
|
H A D | bug40374.phpt | 6 $file = tempnam(sys_get_temp_dir(), "test_"); 7 var_dump($file); 8 $fp = fopen($file, "wt"); 11 unlink($file);
|
H A D | 005_error.phpt | 7 Description: Returns the time the file was last accessed, or FALSE 11 Description: Returns the time the file was last modified, or FALSE 27 var_dump( fileatime("/no/such/file/or/dir") ); 28 var_dump( filemtime("/no/such/file/or/dir") ); 29 var_dump( filectime("/no/such/file/or/dir") ); 30 var_dump( touch("/no/such/file/or/dir", 10) ); 46 var_dump( fileatime("/no/such/file/or/dir", "string") ); 47 var_dump( filemtime("/no/such/file/or/dir", 100) ); 48 var_dump( filectime("/no/such/file/or/dir", TRUE) ); 49 var_dump( touch("/no/such/file/or/dir", 10, 100, 123) ); [all …]
|
/PHP-5.4/ext/spl/examples/ |
H A D | inigroups.inc | 3 /** @file inigroups.inc 16 * @brief Class to iterate all groups within an ini file. 20 * Using this class you can iterator over all groups of a ini file. 31 * Construct an ini file group iterator from a filename. 33 * @param file Ini file to open. 35 function __construct($file) { 36 parent::__construct(new DbaReader($file, 'inifile'), '^\[.*\]$');
|
H A D | phar_from_dir.php | 42 foreach($dir as $file) 44 echo "$file\n"; 45 copy($file, "phar://newphar/$file");
|
H A D | dbareader.inc | 3 /** @file dbareader.inc 25 * Open database $file with $handler in read only mode. 27 * @param file Database file to open. 30 function __construct($file, $handler) { 31 if (!$this->db = dba_open($file, 'r', $handler)) { 32 throw new exception('Could not open file ' . $file);
|
/PHP-5.4/ext/zlib/tests/ |
H A D | gzopen_variation6.phpt | 2 Test gzopen() function : variation: relative/absolute file 12 * Description: Open a .gz-file and return a .gz-file pointer 22 gzwrite($h, "This is an absolute file"); 26 gzwrite($h, "This is a relative file"); 45 This is an absolute file 46 This is a relative file
|
/PHP-5.4/ext/standard/tests/url/ |
H A D | parse_url_basic_007.phpt | 53 ….php.net:80/this/is/a/very/deep/directory/../file.php : string(42) "/this/is/a/very/deep/directo… 77 --> zlib:/path/to/my/file/file.txt : string(25) "/path/to/my/file/file.txt" 83 --> file:///path/to/file : string(13) "/path/to/file" 84 --> file://path/to/file : string(8) "/to/file" 85 --> file:/path/to/file : string(13) "/path/to/file" 102 --> file:///: : string(2) "/:" 103 --> file:///a:/ : string(3) "a:/" 104 --> file:///ab:/ : string(5) "/ab:/" 105 --> file:///a:/ : string(3) "a:/" 106 --> file:///@:/ : string(3) "@:/" [all …]
|
/PHP-5.4/ext/xmlreader/tests/ |
H A D | 007.phpt | 11 $file = dirname(__FILE__) . '/_007.xml'; 12 file_put_contents($file, $xmlstring); 15 $reader->open($file); 21 print "file relaxNG: ok\n"; 23 print "file relaxNG: failed\n"; 26 unlink($file); 53 file relaxNG: ok
|
/PHP-5.4/ext/fileinfo/ |
H A D | fileinfo.php | 12 foreach ($files as $file) { 13 echo finfo_file($res, $file) . "\n"; 26 foreach ($files as $file) { 27 echo $fi->buffer(file_get_contents($file)) . "\n";
|
/PHP-5.4/Zend/tests/ |
H A D | bug52508.phpt | 6 $file = dirname(__FILE__) .'/bug52508.ini'; 8 file_put_contents($file, "a = 1"); 10 $ini_array = parse_ini_file($file, true, INI_SCANNER_RAW); 13 unlink($file);
|
/PHP-5.4/tests/lang/ |
H A D | bug38579.phpt | 2 Bug #38579 (include_once() may include the same file twice) 11 $file = dirname(__FILE__)."/bug38579.inc"; 12 include_once(strtolower($file)); 13 include_once(strtoupper($file));
|
/PHP-5.4/scripts/dev/ |
H A D | credits | 8 file=ext/standard/credits_$what.h 9 cat >$file <<END 18 CREDITS file instead 25 awk "$awkprog" $files | sort -f | uniq >> $file 26 echo "Updated $file"
|
/PHP-5.4/ext/bcmath/libbcmath/ |
H A D | config.h.in | 15 /* Define if you have the <lib.h> header file. */ 18 /* Define if you have the <limits.h> header file. */ 21 /* Define if you have the <stdarg.h> header file. */ 24 /* Define if you have the <stddef.h> header file. */ 27 /* Define if you have the <stdlib.h> header file. */ 30 /* Define if you have the <string.h> header file. */ 33 /* Define if you have the <unistd.h> header file. */
|