Home
last modified time | relevance | path

Searched refs:file (Results 201 – 225 of 1891) sorted by relevance

12345678910>>...76

/PHP-5.3/ext/standard/tests/file/
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 Dfgetcsv_variation23.phpt2 Test fgetcsv() : usage variations - empty file
7 Description: Gets line from file pointer and parse for CSV fields
10 /* Testing fgetcsv() to read from an empty file */
12 echo "*** Testing fgetcsv() : reading from file which is having zero content ***\n";
14 // try reading from file which is having zero content
15 // create the file and then open in read mode and try reading
21 echo "Error: failed to create file $filename!\n";
33 // close and delete the file
39 *** Testing fgetcsv() : reading from file which is having zero content ***
H A Dfscanf_variation54.phpt8 Description: Parses input from a file according to a format
11 /* Test fscanf() to scan a file to read objects */
15 echo "*** Test fscanf(): to read objects from a file ***\n";
30 // create a file
34 exit("Error:failed to open file $filename");
35 //writing object to the file
38 //closing the file
46 // opening file for read
49 exit("Error:failed to open file $filename");
68 *** Test fscanf(): to read objects from a file ***
H A Dfile_variation3.phpt2 Test file() function : second parameter variation
5 /* Prototype : array file(string filename [, int flags[, resource context]])
6 * Description: Read entire file into an array
7 * Source code: ext/standard/file.c
11 echo "*** Testing file() : usage variation ***\n";
107 var_dump( file($filename, $value, $context) );
115 *** Testing file() : usage variation ***
128 Error: 2 - file(): '-10' flag is not supported, %s(%d)
132 Error: 2 - file(): '%i' flag is not supported, %s(%d)
136 Error: 2 - file(): '%i' flag is not supported, %s(%d)
[all …]
H A Dcopy_variation11.phpt6 Description: Makes a copy of the file source to dest.
14 echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n";
15 $file = $file_path."/copy_variation11.tmp";
16 $file_handle = fopen($file, "w");
24 var_dump( filesize($file) ); //size of source before copy
31 var_dump( copy($file, $dir) ); //expected: bool(false)
33 var_dump( file_exists($file) ); //expected: bool(true)
36 var_dump( is_file($file) ); //expected: bool(true)
37 var_dump( is_dir($file) ); //expected: bool(false)
42 var_dump( filesize($file) ); //size of source after copy
[all …]
H A Dfile_variation8-win32.phpt2 Test file() function : variation - various absolute and relative paths
12 /* Prototype : array file(string filename [, int flags[, resource context]])
13 * Description: Read entire file into an array
14 * Source code: ext/standard/file.c
18 echo "*** Testing file() : variation ***\n";
60 var_dump(file($dir."\\".$filename));
71 *** Testing file() : variation ***
99 Warning: file(%sfileVar8.dir\fileVar8Sub\..\\\fileVar8Sub\\..\\..\fileVar8Sub\FileGetContentsVar7.t…
104 Warning: file(%sfileVar8.dir\fileVar8Sub\BADDIR\FileGetContentsVar7.tmp): failed to open stream: No…
133 Warning: file(BADDIR\FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
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 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 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 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 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 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 ---
/PHP-5.3/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"
102 --> file:///: : string(4) "file"
103 --> file:///a:/ : string(4) "file"
104 --> file:///ab:/ : string(4) "file"
105 --> file:///a:/ : string(4) "file"
106 --> file:///@:/ : string(4) "file"
[all …]
/PHP-5.3/ext/simplexml/tests/
H A D022.phpt10 <pres><content><file glob="slide_*.xml"/></content></pres>
19 var_dump($sxe->content->file);
22 foreach($sxe->content->file as $file)
24 var_dump($file);
25 var_dump($file['glob']);
33 ["file"]=>
/PHP-5.3/ext/standard/tests/dir/
H A Dreaddir_variation6.phpt17 // include the file.inc for Function: function create_files()
18 include( dirname(__FILE__)."/../file/file.inc");
35 while (FALSE !== ($file = readdir($dir_handle1))) {
36 $a[] = $file;
39 foreach ($a as $file) {
40 var_dump($file);
45 while (FALSE !== ($file = readdir())) {
46 $a[] = $file;
49 foreach ($a as $file) {
50 var_dump($file);
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-5.3/ext/spl/tests/
H A Dfileobject_getsize_basic.phpt10 $file = __DIR__ ."/data.txt";
11 file_put_contents($file, "foobar");
13 $s = new SplFileObject( $file );
18 $file = __DIR__ ."/data.txt";
19 unlink($file);
/PHP-5.3/ext/standard/tests/image/
H A Dgetimagesize_246x247.phpt13 while (($file = readdir($dir)) !== FALSE) {
14 if (preg_match('/^246x247\./',$file)) {
15 $files[] = $file;
20 foreach($files as $file) {
21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
H A Dgetimagesize_384x385.phpt13 while (($file = readdir($dir)) !== FALSE) {
14 if (preg_match('/^384x385\./',$file)) {
15 $files[] = $file;
20 foreach($files as $file) {
21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
/PHP-5.3/ext/zlib/tests/
H A Dgzopen_variation8.phpt2 Test gzopen() function : variation: opening a plain file
12 * Description: Open a .gz-file and return a .gz-file pointer
25 $file = "gzopen_variation8.tmp";
26 $h = fopen($file, 'w');
30 $h = gzopen($file, 'r');
34 unlink($file);
/PHP-5.3/scripts/dev/
H A Dconv_proto18 for file in ${1+"$@"} ; do
19 echo "working on $file"
20 cat $file | \
25 cp $tmpfile $file
/PHP-5.3/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;

Completed in 74 milliseconds

12345678910>>...76