Home
last modified time | relevance | path

Searched refs:file (Results 151 – 175 of 1994) sorted by relevance

12345678910>>...80

/PHP-7.4/ext/standard/tests/file/
H A Dbug75679.phpt12 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))
37 foreach ($Files2Report as $file => &$Report)
39 if (is_file($file)) {
40 unlink($file);
43 $d1 = dirname($file);
H A Dfilesize_variation4.phpt2 Test filesize() function: usage variations - file mode & holes in file
16 /* Testing filesize() with data written using different file modes and by creating holes in file */
21 …** Testing filesize() with data written using different file modes and by creating holes in file *…
42 echo "-- opening the file in 'a' mode, adding data and checking the file --\n";
49 echo "-- opening the file in 'at' mode, adding data and checking the file --\n";
75 echo "-- with empty file --\n";
91 *** Testing filesize() with data written using different file modes and by creating holes in file *…
98 -- opening the file in 'a' mode, adding data and checking the file --
100 -- opening the file in 'at' mode, adding data and checking the file --
107 -- opening the existing file in write mode --
[all …]
H A Dfgetcsv_variation10.phpt2 Test fgetcsv() : usage variations - file pointer pointing to EOF
10 /* Testing fgetcsv() by reading from a file when the file pointer is pointing to end of file */
47 echo "Error: failed to create file $filename!\n";
61 // else rewind the file pointer to beginning of the file
68 // set the file pointer to EOF
73 // now file pointer should point to end of the file, try reading again
76 // check the file pointer position and if eof
80 // check the file pointer position and if eof
84 // close the file
86 //delete file
[all …]
H A Dfile_variation5.phpt2 file() with various paths
23 echo "file() on a path containing .. and .\n";
24 var_dump(file("./$test_dirname/../$filename"));
27 var_dump(file("./$test_dirname/bad_dir/../../$filename"));
29 echo "\nfile() on a linked file\n";
32 var_dump(file($linkname));
37 var_dump(file("../$filename"));
46 file() on a path containing .. and .
58 file() on a path containing .. with invalid directories
70 file() on a linked file
[all …]
H A Dstat_variation2-win32.phpt2 Test stat() functions: usage variations - effects of writing to file
14 * Description: Gives information about a file
17 /* test the effects of writing to a file on the stats of the file */
21 require "$file_path/file.inc";
25 $file_handle = fopen($filename, "w"); // temp file
29 echo "*** Testing stat(): writing to a file ***\n";
31 // writing to an empty file
32 echo "-- Testing stat() on file after data is written in it --\n";
36 $file_handle = fopen($filename, "w"); // temp file
57 *** Testing stat(): writing to a file ***
[all …]
H A Dlstat_stat_variation4.phpt2 Test lstat() and stat() functions: usage variations - effects of touch() on file
10 Description: Gives information about a file or symbolic link
13 Description: Gives information about a file
16 /* test the effects of touch() on stats of file */
19 require "$file_path/file.inc";
22 /* create temp file */
25 $fp = fopen($file_name, "w"); // temp file
28 // touch a file check stat, there should be difference in atime
29 echo "*** Testing stat() for file after using touch() on the file ***\n";
55 *** Testing stat() for file after using touch() on the file ***
H A Dunlink_basic.phpt11 echo "*** Testing unlink() on a file ***\n";
12 $filename = "$file_path/unlink_basic.tmp"; // temp file name used here
13 $fp = fopen($filename, "w"); // create file
17 // delete file
19 var_dump( file_exists($filename) ); // confirm file doesnt exist
24 // temp file name used here
26 $fp = fopen($filename, "w"); // create file
29 // delete file
31 var_dump( file_exists($filename) ); // confirm file doesnt exist
36 *** Testing unlink() on a file ***
H A Dfgetc_variation1.phpt2 Test fgetc() function : usage variations - read when file pointer at EOF
7 Description: Gets character from file pointer
10 include ("file.inc");
13 echo "-- Testing fgetc() with file whose file pointer is pointing to EOF --\n";
14 // create a file
19 // loop to check the file opened in different read modes
25 // open the file
28 echo "Error: failed to open file $filename! \n";
32 // seek to end of the file and try fgetc()
40 // close the file handle
[all …]
H A Dunlink_variation1-win32.phpt2 Test unlink() function : usage variations - unlinking file in a directory
27 echo "\n*** Testing unlink() on file inside a directory ***\n";
30 // create temp file inside $dirname
40 var_dump( file_exists($filename) ); // confirm file is deleted
50 // create the temp file
54 // remove write permission from file
57 // now try deleting temp file inside $dirname
60 // reassign write permission to temp file
62 // delete temp file
64 var_dump( file_exists($filename) ); // confirm file is deleted
[all …]
H A Dunlink_variation1-win32-mb.phpt2 Test unlink() function : usage variations - unlinking file in a directory
28 echo "\n*** Testing unlink() on file inside a directory ***\n";
31 // create temp file inside $dirname
41 var_dump( file_exists($filename) ); // confirm file is deleted
51 // create the temp file
55 // remove write permission from file
58 // now try deleting temp file inside $dirname
61 // reassign write permission to temp file
63 // delete temp file
65 var_dump( file_exists($filename) ); // confirm file is deleted
[all …]
H A D007_variation15.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "xt" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
20 checking for the warning msg when trying to open an existing file in "xt" mode,
25 $file = $file_path."/007_variation15.tmp";
28 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea…
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation16.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "x+t" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
20 checking for the warning msg when trying to open an existing file in "x+t" mode,
25 $file = $file_path."/007_variation16.tmp";
28 $file_handle = fopen($file, "x+t"); //opening the non-existing file in "x+t" mode, file will be cr…
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation23.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "xb" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
20 checking for the warning msg when trying to open an existing file in "xb" mode,
25 $file = $file_path."/007_variation23.tmp";
28 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea…
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation24.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "x+b" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
20 checking for the warning msg when trying to open an existing file in "x+b" mode,
25 $file = $file_path."/007_variation24.tmp";
28 $file_handle = fopen($file, "x+b"); //opening the non-existing file in "x+b" mode, file will be cr…
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation7.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "x" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
20 checking for the warning msg when trying to open an existing file in "x" mode,
25 $file = $file_path."/007_variation7.tmp";
28 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A Dfgetcsv_variation14.phpt32 echo "Error: failed to create file $filename!\n";
39 // else rewind the file pointer to beginning of the file
44 // rewind the file pointer to bof
55 // check the file pointer position and if eof
60 // check the file pointer position and if eof
64 // close the file
66 //delete file
75 -- Testing fgetcsv() with file opened using r mode --
86 -- Testing fgetcsv() with file opened using rb mode --
97 -- Testing fgetcsv() with file opened using rt mode --
[all …]
H A Dfputcsv_variation2.phpt62 //close the file
68 //delete file
78 -- file opened in r+ --
86 -- file opened in r+b --
94 -- file opened in r+t --
102 -- file opened in a+ --
126 -- file opened in w+ --
150 -- file opened in x+ --
174 -- file opened in r+ --
198 -- file opened in a+ --
[all …]
H A Dfputcsv_variation3.phpt62 //close the file
68 //delete file
78 -- file opened in r+ --
86 -- file opened in r+b --
94 -- file opened in r+t --
102 -- file opened in a+ --
126 -- file opened in w+ --
150 -- file opened in x+ --
174 -- file opened in r+ --
198 -- file opened in a+ --
[all …]
H A Dfputcsv_variation4.phpt62 //close the file
68 //delete file
78 -- file opened in r+ --
86 -- file opened in r+b --
94 -- file opened in r+t --
102 -- file opened in a+ --
126 -- file opened in w+ --
150 -- file opened in x+ --
174 -- file opened in r+ --
198 -- file opened in a+ --
[all …]
/PHP-7.4/ext/standard/tests/general_functions/
H A Dbug41445.phpt6 $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);
H A Dbug40752.phpt6 $file = __DIR__."/bug40752.ini";
7 file_put_contents($file, '
12 var_dump(parse_ini_file($file));
14 file_put_contents($file, '
19 var_dump(parse_ini_file($file));
21 unlink($file);
/PHP-7.4/ext/zip/examples/
H A Dencryption.php9 $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-7.4/ext/session/tests/
H A Dsession_basic3.phpt41 <a href="file.php">test</a>
42 <a href="file.php?foo">test</a>
43 <a href="file.php?foo=var">test</a>
82 <a href="//php.net/file.php">test</a>
132 <a href="file.php">test</a>
133 <a href="file.php?foo">test</a>
134 <a href="file.php?foo=var">test</a>
136 <a href="../file.php">test</a>
137 <a href="../file.php?foo">test</a>
138 <a href="../file.php?foo=var">test</a>
[all …]
/PHP-7.4/Zend/tests/
H A Ddebug_backtrace_limit.phpt27 [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
/PHP-7.4/ext/phar/tests/
H A Dbug66960.phpt10 $file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
11 $phar = new Phar($file);
12 var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN-1)));
13 var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN)));
14 var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
18 $file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
19 unlink($file);

Completed in 38 milliseconds

12345678910>>...80