Home
last modified time | relevance | path

Searched refs:file (Results 226 – 250 of 2075) sorted by relevance

12345678910>>...83

/PHP-7.0/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 Dfile_get_contents_basic.phpt10 * Description: Reads entire file into a string
14 include($file_path."/file.inc");
18 echo "-- Testing with simple valid data file --\n";
21 create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
25 echo "\n-- Testing with empty file --\n";
27 create_files($file_path, 1, "empty", 0755, 100, "w", "file", 1, "byte");
35 -- Testing with simple valid data file --
38 -- Testing with empty file --
H A Dfopen_variation6.phpt2 Test fopen() function : variation: use include path and stream context relative/absolute file
8 * Description: Open a file or a URL and return a file pointer
9 * Source code: ext/standard/file.c
18 fwrite($h, "This is an absolute file");
22 fwrite($h, "This is a relative file");
42 This is an absolute file
43 This is a relative file
H A Dunlink_variation1.phpt2 Test unlink() function : usage variations - unlinking file in a directory
25 /* Delete file having default permission but its dir having readonly permission
26 Delete file having readonly permission but dir having default permission
37 echo "\n*** Testing unlink() on file inside a directory ***\n";
40 // create temp file inside $dirname
49 var_dump( file_exists($filename) ); // confirm file is deleted
59 // create the temp file
63 // remove write permission from file
65 // now try deleting temp file inside $dirname
75 *** Testing unlink() on file inside a directory ***
[all …]
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 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";
54 *** Testing stat() on a file after using is_file() on it ***
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 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 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";
52 *** 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";
52 *** Testing stat() on file after data is written in it ***
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 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 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";
79 *** Testing stat(): on file and directory after accessing it
86 -- Testing on file --
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
/PHP-7.0/ext/standard/tests/dir/
H A Dclosedir_variation3.phpt2 Test closedir() function : usage variations - close a file pointer
12 * Create a file pointer using fopen() then try to close it using closedir()
17 echo "\n-- Open a file using fopen() --\n";
20 echo "\n-- Try to close the file pointer using closedir() --\n";
23 echo "\n-- Check file pointer: --\n";
34 -- Open a file using fopen() --
37 -- Try to close the file pointer using closedir() --
42 -- Check file pointer: --
/PHP-7.0/sapi/phpdbg/
H A Dphpdbg_list.c61 efree(file); in PHPDBG_LIST()
65 zend_string *file; in PHPDBG_LIST() local
72 phpdbg_list_file(file, param->file.line, 0, 0); in PHPDBG_LIST()
73 zend_string_release(file); in PHPDBG_LIST()
246 filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename); in phpdbg_compile_file()
296 char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename); in phpdbg_init_compile_file()
304 if (file->opened_path) { in phpdbg_init_compile_file()
308 if (file->free_filename) { in phpdbg_init_compile_file()
309 efree((char *) file->filename); in phpdbg_init_compile_file()
311 file->free_filename = 0; in phpdbg_init_compile_file()
[all …]
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);
/PHP-7.0/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");
/PHP-7.0/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.0/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.0/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.0/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"
84 --> file:///path/to/file : string(4) "file"
85 --> file://path/to/file : string(4) "file"
86 --> file:/path/to/file : string(4) "file"
103 --> file:///: : string(4) "file"
104 --> file:///a:/ : string(4) "file"
105 --> file:///ab:/ : string(4) "file"
106 --> file:///a:/ : string(4) "file"
107 --> file:///@:/ : string(4) "file"
[all …]
/PHP-7.0/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

Completed in 39 milliseconds

12345678910>>...83