Home
last modified time | relevance | path

Searched refs:file (Results 276 – 300 of 2191) sorted by relevance

1...<<11121314151617181920>>...88

/PHP-7.1/ext/standard/tests/file/
H A Dstat_variation8-win32.phpt14 * 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
69 *** Testing stat(): on file by truncating it to given size ***
H A Drename_variation3-win32.phpt12 Description: Renames a file or directory
15 require dirname(__FILE__).'/file.inc';
22 /* test rename() by trying to rename an existing file/dir to the same name
32 echo "\n-- Renaming file to same file name --\n";
40 echo "\n-- Renaming existing file to existing directory name --\n";
45 echo "\n-- Renaming existing directory to existing file name --\n";
64 -- Renaming file to same file name --
72 -- Renaming existing file to existing directory name --
79 -- Renaming existing directory to existing file name --
H A Drename_variation5.phpt18 //create a file
29 echo "\n-- Renaming file to same file name --\n";
37 echo "\n-- Renaming existing link to existing file name --\n";
40 echo "\n-- Renaming existing file to existing directory name --\n";
42 echo "\n-- Renaming existing file to existing link name --\n";
45 echo "\n-- Renaming existing directory to existing file name --\n";
65 -- Renaming file to same file name --
76 -- Renaming existing link to existing file name --
79 -- Renaming existing file to existing directory name --
84 -- Renaming existing file to existing link name --
[all …]
H A Dbug39538.phpt7 $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 Dbug65272.phpt10 $file = dirname(__FILE__)."/flock_bug65272.dat";
12 $fp1 = fopen($file, "w");
15 $fp2 = fopen($file, "r");
23 $file = dirname(__FILE__)."/flock_bug65272.dat";
24 unlink($file);
H A Dcopy_basic.phpt6 * 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";
44 *** Testing copy() function: to copy file from source to destination --
48 -- Checking whether the copy of file exists --
51 -- Checking filepermissions of file and its copies --
H A Dfile_variation9.phpt2 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 Dlstat_stat_variation1.phpt2 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 Dbug44805.phpt15 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 Dbug40374.phpt6 $file = tempnam(sys_get_temp_dir(), "test_");
7 var_dump($file);
8 $fp = fopen($file, "wt");
11 unlink($file);
H A Dfiletype_error.phpt7 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 Dfscanf_variation53.phpt8 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 Dunlink_variation6.phpt8 * 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";
/PHP-7.1/ext/phar/tests/
H A Dphar_copy.phpt17 $iname = '/file.txt';
79 file "notexisting" cannot be copied to file "another", file does not exist in %sphar_copy2.phar.php
80 file "a" cannot be copied to file "b", file must not already exist in phar %sphar_copy2.phar.php
82 file "d" cannot be copied to file ".phar/stub.php", cannot copy to Phar meta-file in %sphar_copy2.p…
83 file ".phar/stub.php" cannot be copied to file "d", cannot copy Phar meta-file in %sphar_copy2.phar…
/PHP-7.1/ext/standard/tests/strings/
H A Dsha1_file.phpt7 * Description: Calculate the sha1 hash of a file
12 /* Creating an empty file */
16 /* Creating a data file */
20 /* Writing into file */
22 $content = b"Add this to the file\n";
25 echo "Cannot write to file ($filename)";
58 echo "\n-- Raw Binary Output for Empty file as Argument --\n";
108 -- Hexadecimal Output for Empty file as Argument --
111 -- Raw Binary Output for Empty file as Argument --
114 -- Hexadecimal Output for a valid file with some contents --
[all …]
/PHP-7.1/ext/standard/tests/url/
H A Durls.inc33 'http://www.php.net:80/this/is/a/very/deep/directory/../file.php',
57 'zlib:/path/to/my/file/file.txt',
64 'file:///path/to/file',
65 'file://path/to/file',
66 'file:/path/to/file',
83 'file:///:',
84 'file:///a:/',
85 'file:///ab:/',
86 'file:///a:/',
87 'file:///@:/',
[all …]
H A Dparse_url_basic_007.phpt53 ….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"
84 --> file:///path/to/file : string(13) "/path/to/file"
85 --> file://path/to/file : string(8) "/to/file"
86 --> file:/path/to/file : string(13) "/path/to/file"
103 --> file:///: : string(2) "/:"
104 --> file:///a:/ : string(3) "a:/"
105 --> file:///ab:/ : string(5) "/ab:/"
106 --> file:///a:/ : string(3) "a:/"
107 --> file:///@:/ : string(3) "@:/"
[all …]
/PHP-7.1/ext/spl/
H A Dspl_directory.c274 intern->u.file.context = php_stream_context_from_zval(intern->u.file.zcontext, 0); in spl_filesystem_file_open()
300 intern->u.file.open_mode = estrndup(intern->u.file.open_mode, intern->u.file.open_mode_len); in spl_filesystem_file_open()
303 ZVAL_RES(&intern->u.file.zresource, intern->u.file.stream->res); in spl_filesystem_file_open()
527 &intern->u.file.open_mode, &intern->u.file.open_mode_len, in spl_filesystem_object_create_type()
636 ZVAL_STRINGL(&tmp, intern->u.file.open_mode, intern->u.file.open_mode_len); in spl_filesystem_object_get_debug_info()
2163 … spl_filesystem_file_read_csv(intern, intern->u.file.delimiter, intern->u.file.enclosure, intern->… in spl_filesystem_file_read_line_ex()
2270 &intern->u.file.open_mode, &intern->u.file.open_mode_len, in SPL_METHOD()
2417 RETURN_STRINGL(intern->u.file.current_line, intern->u.file.current_line_len); in SPL_METHOD()
2435 if (!intern->u.file.current_line && Z_ISUNDEF(intern->u.file.current_zval)) { in SPL_METHOD()
2576 …char delimiter = intern->u.file.delimiter, enclosure = intern->u.file.enclosure, escape = intern->… in SPL_METHOD()
[all …]
/PHP-7.1/ext/spl/tests/
H A Dspl_fileinfo_getextension_leadingdot.phpt5 $file = __DIR__ . '/.test';
6 touch($file);
7 $fileInfo = new SplFileInfo($file);
10 unlink($file);
/PHP-7.1/Zend/tests/
H A Dbug52508.phpt6 $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-7.1/ext/fileinfo/
H A Dfileinfo.php12 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-7.1/ext/xmlreader/tests/
H A D007.phpt11 $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-7.1/ext/standard/tests/file/windows_mb_path/
H A Dtest_long_path_bug70943.phpt2 Bug #70943 fopen() can't open a file if path is 259 characters long
13 // Generates a sample file whose path is exactly 259 characters long
15 echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n";
18 echo "Opening file... ";
29 Generating a file with a path length of 259 characters...
30 Opening file... OK
/PHP-7.1/ext/spl/examples/
H A Ddbareader.inc3 /** @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-7.1/tests/lang/
H A Dbug38579.phpt2 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));

Completed in 58 milliseconds

1...<<11121314151617181920>>...88