Home
last modified time | relevance | path

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

12345678910>>...75

/PHP-5.5/ext/standard/tests/file/
H A D007_variation17.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "rb" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
23 require($file_path."/file.inc");
26 $file = $file_path."/007_variation17.tmp";
30 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode
33 var_dump( ftell($file_handle) ); //Initial position of file pointer
36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
H A D007_variation9.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "rt" mode,
18 checking for the file creation, write & read operations,
19 checking for the file pointer position,
23 require($file_path."/file.inc");
26 $file = $file_path."/007_variation9.tmp";
30 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode
33 var_dump( ftell($file_handle) ); //Initial position of file pointer
36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
H A Dfgetcsv_variation17.phpt45 echo "Error: failed to create file $filename!\n";
58 // else rewind the file pointer to beginning of the file
63 // rewind the file pointer to bof
74 // check the file pointer position and if eof
80 // check the file pointer position and if eof
84 // close the file
86 //delete file
96 -- Testing fgetcsv() with file opened using r mode --
112 -- Testing fgetcsv() with file opened using rb mode --
128 -- Testing fgetcsv() with file opened using rt mode --
[all …]
H A Dfgetcsv_variation6.phpt50 echo "Error: failed to create file $filename!\n";
64 // else rewind the file pointer to beginning of the file
69 // rewind the file pointer to bof
80 // check the file pointer position and if eof
85 // check the file pointer position and if eof
89 // close the file
91 //delete file
101 -- Testing fgetcsv() with file opened using r mode --
117 -- Testing fgetcsv() with file opened using rb mode --
133 -- Testing fgetcsv() with file opened using rt mode --
[all …]
H A Dfgetcsv_variation19.phpt46 echo "Error: failed to create file $filename!\n";
59 // else rewind the file pointer to beginning of the file
64 // rewind the file pointer to bof
76 // check the file pointer position and if eof
80 // close the file
82 //delete file
92 -- Testing fgetcsv() with file opened using r mode --
102 -- Testing fgetcsv() with file opened using rb mode --
112 -- Testing fgetcsv() with file opened using rt mode --
122 -- Testing fgetcsv() with file opened using r+ mode --
[all …]
H A Duserwrapper.phpt6 function unlink($file) {
7 print "Unlinking file: $file\n";
23 /* By printing out a notice that we are actively stating the file
26 print "Stating file: $path\n";
36 unlink('test://example.com/path/to/file');
42 print_r(stat('test://example.com/path/to/file'));
43 echo "Filesize = " . filesize('test://example.com/path/to/file') . "\n";
44 echo "filemtime = " . filemtime('test://example.com/path/to/file') . "\n";
47 Unlinking file: test://example.com/path/to/file
51 Stating file: test://example.com/path/to/file
H A Dfile_variation8.phpt2 Test file function : variation - various absolute and relative paths
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";
52 var_dump(file($dir."/".$filename));
63 *** Testing file() : variation ***
91 Warning: file(%sfileVar8.dir/fileVar8Sub/..///fileVar8Sub//..//../fileVar8Sub/FileGetContentsVar7.t…
96 Warning: file(%sfileVar8.dir/fileVar8Sub/BADDIR/FileGetContentsVar7.tmp): failed to open stream: No…
125 Warning: file(BADDIR/FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
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 …]
/PHP-5.5/ext/mysqli/tests/
H A Dlocal_infile_tools.inc3 function shutdown_clean($file) {
4 if ($file) {
5 unlink($file);
28 if (!$file) {
51 // create a CVS file
55 printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file);
67 printf("[%03d + 2] Cannot write CVS file '%s'\n", $offset, $file);
75 printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file);
82 if (!chmod($file, 0644)) {
85 $offset, $file);
[all …]
/PHP-5.5/ext/spl/tests/
H A DSplFileInfo_getExtension_basic.phpt5 $file = md5('SplFileInfo::getExtension');
8 touch($file . $ext);
9 $info = new SplFileInfo($file . $ext);
10 var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION));
15 $file = md5('SplFileInfo::getExtension');
18 unlink($file . $ext);
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.5/ext/zlib/tests/
H A Dgzopen_variation4.phpt12 * Description: Open a .gz-file and return a .gz-file pointer
49 // should read dir2 file
55 //create a file in dir1
60 //should now read dir1 file
111 This is a file in dir2
112 This is a file in dir1
113 This is a file in dir1
115 This is a file in script dir
155 This is a file in dir2
156 This is a file in dir1
[all …]
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.5/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.5/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);
/PHP-5.5/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");

Completed in 38 milliseconds

12345678910>>...75