Home
last modified time | relevance | path

Searched refs:file (Results 251 – 275 of 2191) sorted by relevance

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

/PHP-7.1/ext/standard/tests/file/
H A Dbug53848.phpt5 $file = dirname(__FILE__) . "/bug39538.csv";
6 @unlink($file);
7 file_put_contents($file, "a,b\n c, d");
8 $fp = fopen($file, "r");
11 @unlink($file);
H A Dfilesize_variation2-win32.phpt12 Description : Returns the size of the file in bytes, or FALSE
17 require($file_path."/file.inc");
21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
27 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
42 echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
43 // create only the file, as base and subdir is already created
46 fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
54 // size of file inside subdir
70 *** Testing size of a dir, sub-dir and file with filesize() ***
73 -- Creating a file inside base dir, and checking dir & file size --
[all …]
H A Dfilesize_variation2.phpt12 Description : Returns the size of the file in bytes, or FALSE
17 require($file_path."/file.inc");
21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
27 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
42 echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
43 // create only the file, as base and subdir is already created
46 fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
54 // size of file inside subdir
70 *** Testing size of a dir, sub-dir and file with filesize() ***
73 -- Creating a file inside base dir, and checking dir & file size --
[all …]
H A Dfputcsv_variation14.phpt36 // create the file
47 // create the file
71 //close the file
77 //delete file
87 -- file opened in r --
97 -- file opened in rb --
107 -- file opened in rt --
117 -- file opened in r --
147 -- file opened in r --
177 -- file opened in r --
[all …]
H A Dfile_variation.phpt2 Test file() function : usage variations
7 * Description: Reads entire file into an array
8 Returns the file in an array
10 require(dirname(__FILE__) . '/file.inc');
13 echo "*** Using various flags values with different data in a file\n";
32 var_dump( file("file1_variation.tmp", FILE_USE_INCLUDE_PATH) );
33 var_dump( file($file_path1."/file1_variation.tmp", 1) );
39 $out_array = file($file_path."/file2_variation.tmp");
44 // Loop through file content array
50 var_dump( file($file_path."/file3_variation.tmp" ));
[all …]
H A Dfseek_variation3.phpt2 Test fseek() function : variation functionality beyond file boundaries
8 * Description: Seek on a file pointer
9 * Source code: ext/standard/file.c
13 echo "*** Testing fseek() : variation - beyond file boundaries ***\n";
22 echo "--- fseek beyond start of file ---\n";
30 echo "--- fseek beyond end of file ---\n";
43 *** Testing fseek() : variation - beyond file boundaries ***
44 --- fseek beyond start of file ---
51 --- fseek beyond end of file ---
H A Dfgetc_variation2.phpt7 Description: Gets character from file pointer
11 - closed file handle
12 - unset file handle
16 include ("file.inc");
21 // open the file for reading
23 // close the file
26 // read from closed file
30 // open the file for reading
32 // unset the file handle
H A Dlstat_stat_variation11.phpt13 Description: Gives information about a file or symbolic link
16 Description: Gives information about a file
20 require "$file_path/file.inc";
22 /* test the effects of is_file() on stats of a file */
24 /* create temp file */
26 $fp = fopen($filename, "w"); // temp file
29 // is_file() on a file
30 echo "*** Testing stat() on a file after using is_file() on it ***\n";
53 *** Testing stat() on a file after using is_file() on it ***
H A Dlstat_stat_variation16.phpt2 Test lstat() and stat() functions: usage variations - effects changing permissions of file
13 Description: Gives information about a file or symbolic link
16 Description: Gives information about a file
19 /* test the effects on stats with changing permissions of file */
22 require "$file_path/file.inc";
25 $fp = fopen($filename, "w"); // temp file
28 // checking stat() on file after changing its permission
29 echo "*** Testing lstat() on a file after changing its access permission ***\n";
51 *** Testing lstat() on a file after changing its access permission ***
H A Dlstat_stat_variation7.phpt2 Test lstat() and stat() functions: usage variations - writing data into file
12 Description: Gives information about a file or symbolic link
15 Description: Gives information about a file
19 require "$file_path/file.inc";
21 /* test the effects on stats with writing data into a file */
24 $fp = fopen($file_name, "w"); // temp file
27 // writing to an empty file
28 echo "*** Testing stat() on file after data is written in it ***\n";
51 *** Testing stat() on file after data is written in it ***
H A Dstat_variation4-win32.phpt14 * Description: Gives information about a file
17 /* test the effects on the stats of dir/file for using is_dir() & is_file() on dir/file */
20 require "$file_path/file.inc";
23 /* create temp file and directory */
26 $file_handle = fopen("$file_path/stat_variation4.tmp", "w"); // temp file
30 echo "\n*** Testing stat(): on file and directory after accessing it
52 // is_file() on a file
53 echo "-- Testing on file --\n";
78 *** Testing stat(): on file and directory after accessing it
85 -- Testing on file --
H A Dfile_variation5-win32-mb.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"));
31 var_dump(file("../$filename"));
40 file() on a path containing .. and .
52 file() on a path containing .. with invalid directories
64 file() on a relative path from a different working directory
H A Dfile_variation5-win32.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"));
31 var_dump(file("../$filename"));
40 file() on a path containing .. and .
52 file() on a path containing .. with invalid directories
64 file() on a relative path from a different working directory
H A Dfile_put_contents_variation9.phpt12 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
13 * Description: Write/Create a file with contents data and return the number of bytes written
14 * Source code: ext/standard/file.c
26 // link files even though it original file doesn't exist yet
35 //can only create a hardlink if the file exists.
46 function run_test($file) {
49 var_dump(file_put_contents($file, $data));
50 var_dump(file_put_contents($file, $extra, FILE_APPEND));
51 readfile($file);
H A Dfopen_variation16.phpt2 Test fopen() function : variation: use include path create and read a file (relative)
8 * Description: Open a file or a URL and return a file pointer
9 * Source code: ext/standard/file.c
43 fwrite($h, (binary) "This is the test file");
57 echo "could not find file for reading\n";
60 echo "found file - not in dir1\n";
72 found file - not in dir1
74 found file - not in dir1
H A Dfopen_variation17.phpt2 Test fopen() function : variation: use include path create and read a file (relative)
8 * Description: Open a file or a URL and return a file pointer
9 * Source code: ext/standard/file.c
42 fwrite($h, (binary) "This is the test file");
56 echo "could not find file for reading\n";
59 echo "found file for reading\n";
71 found file for reading
73 found file for reading
/PHP-7.1/ext/spl/examples/
H A Dfindfile.inc3 /** @file findfile.inc
24 private $file;
31 * @param $file the name of the files to search fro
33 function __construct($path, $file)
35 $this->file = $file;
48 /** @return whether the current file matches the given filename
52 return !strcmp($this->current(), $this->file);
61 return $this->file;
H A Dphar_from_dir.php42 foreach($dir as $file)
44 echo "$file\n";
45 copy($file, "phar://newphar/$file");
H A Dinigroups.inc3 /** @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'), '^\[.*\]$');
/PHP-7.1/ext/standard/tests/general_functions/
H A Dbug41445_1.phpt6 $file = dirname(__FILE__)."/bug41445_1.ini";
19 file_put_contents($file, $data);
21 var_dump(parse_ini_file($file, TRUE));
22 var_dump(parse_ini_file($file));
24 @unlink($file);
/PHP-7.1/ext/phar/tests/
H A Dphar_stub.phpt12 $file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
21 $file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>';
24 echo fread($fp, strlen($file)) . "\n";
27 $file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>';
30 $phar->setStub($file);
32 echo fread($fp, strlen($file)) . "\n";
38 fwrite($fp, $file);
47 echo fread($fp, strlen($file)) . "\n";
58 $phar->setStub($fp, strlen($file));
62 echo fread($fp, strlen($file)) . "\n";
[all …]
/PHP-7.1/sapi/cgi/tests/
H A D002.phpt14 $file = dirname(__FILE__)."/002.test.php";
16 file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>');
18 var_dump(`$php -n -d max_execution_time=111 $file`);
19 var_dump(`$php -n -d max_execution_time=500 $file`);
20 var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`);
22 file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); var_dump(ini_get("upload_t…
24 var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 $file`);
26 unlink($file);
/PHP-7.1/ext/standard/tests/url/
H A Dparse_url_basic_002.phpt54 --> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : string(4) "http"
78 --> zlib:/path/to/my/file/file.txt : string(4) "zlib"
85 --> file:///path/to/file : string(4) "file"
86 --> file://path/to/file : string(4) "file"
87 --> file:/path/to/file : string(4) "file"
104 --> file:///: : string(4) "file"
105 --> file:///a:/ : string(4) "file"
106 --> file:///ab:/ : string(4) "file"
107 --> file:///a:/ : string(4) "file"
108 --> file:///@:/ : string(4) "file"
[all …]
/PHP-7.1/ext/zlib/tests/
H A Dgzopen_variation6.phpt2 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-7.1/sapi/phpdbg/
H A Dcreate-test.php31 $file = ""; variable
58 $file = realpath($real_argv[0]); variable
63 $proc = proc_open("$phpdbg $pass_options $file -- $cmdargv", [["pipe", "r"], ["pipe", "w"], ["pipe"…
116 $output = str_replace("string(".strlen($file).") \"$file\"", 'string(%d) "%s"', $output);
117 $output = str_replace($file, "%s", $output);
135 if ($file != "") {
136 $testdata .= "\n--FILE--\n".file_get_contents($file);

Completed in 61 milliseconds

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