Home
last modified time | relevance | path

Searched refs:file (Results 101 – 125 of 1735) sorted by relevance

12345678910>>...70

/PHP-5.5/ext/standard/tests/file/
H A Dfile_variation7.phpt2 file() on a file with blank lines
11 echo "file():\n";
12 var_dump(file($filepath));
15 var_dump(file($filepath, FILE_IGNORE_NEW_LINES));
18 var_dump(file($filepath, FILE_SKIP_EMPTY_LINES));
21 var_dump(file($filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
27 file():
45 file() with FILE_IGNORE_NEW_LINES:
59 file() with FILE_SKIP_EMPTY_LINES:
77 file() with FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES:
H A Dcopy_variation10.phpt6 Description: Makes a copy of the file source to dest.
10 /* Test copy(): Try copying source file to desntination file, where destination file name is identi…
14 echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n";
15 $file = $file_path."/copy_variation10.tmp";
16 $file_handle = fopen($file, "w");
20 var_dump( copy($file, $file) );
21 var_dump( file_exists($file) );
22 var_dump( filesize($file) );
33 *** Test copy(): Trying to create a copy of file with the same source name ***
H A Dfgetss_variation4.phpt15 // include the common file related test functions
16 include ("file.inc");
50 // rewind the file pointer to beginning of the file
68 // close the file
70 // delete the file
84 -- Reading when file pointer points to EOF --
99 -- Reading when file pointer points to EOF --
114 -- Reading when file pointer points to EOF --
129 -- Reading when file pointer points to EOF --
144 -- Reading when file pointer points to EOF --
[all …]
H A Dfflush_variation4.phpt2 Test fflush() function: usage variations - file opened in read-only mode
6 Description: Flushes the output to a file
12 require $file_path.'/file.inc';
22 echo "-- Iteration $count with file opened in $mode mode --\n";
24 // creating a file
27 exit("Error:failed to open file $file_name");
30 // opening the file in different read modes
33 exit("Error:failed to open file $file_name");
45 -- Iteration 1 with file opened in r mode --
47 -- Iteration 2 with file opened in rb mode --
[all …]
H A Dfopen_variation10-win32.phpt18 * Description: Open a file or a URL and return a file pointer
50 $thirdfile = 'c:\\'.$file;
91 file in root
94 file in root
99 file not opened for read
106 file not opened for read
113 file not opened for read
123 file not opened for read
128 file in root
140 file in fopen10.tmpDir
[all …]
H A Dfopen_variation11-win32.phpt17 * Description: Open a file or a URL and return a file pointer
49 $thirdfile = 'c:\\'.$file;
89 file in root
92 file in root
97 file not opened for read
104 file not opened for read
111 file not opened for read
121 file not opened for read
126 file in root
138 file in fopen11.tmpDir
[all …]
H A Dfwrite_variation3-win32.phpt23 include ("file.inc");
70 // close the file, get the size and content of the file.
86 -- Opening file in a --
98 -- Opening file in ab --
110 -- Opening file in at --
122 -- Opening file in a+ --
160 -- Opening file in a --
172 -- Opening file in ab --
184 -- Opening file in at --
234 -- Opening file in a --
[all …]
H A Dfwrite_variation3.phpt23 include ("file.inc");
71 // close the file, get the size and content of the file.
87 -- Opening file in a --
99 -- Opening file in ab --
111 -- Opening file in at --
123 -- Opening file in a+ --
161 -- Opening file in a --
173 -- Opening file in ab --
185 -- Opening file in at --
235 -- Opening file in a --
[all …]
H A Dbasename_bug66395-win32.phpt7 echo basename("c:file.txt") . "\n";
8 echo basename("d:subdir\\file.txt") . "\n";
9 echo basename("y:file.txt", ".txt") . "\n";
10 echo basename("notdriveletter:file.txt") . "\n";
14 file.txt
15 file.txt
16 file
17 notdriveletter:file.txt
H A Dfread_basic.phpt13 // include the file.inc for common functions for test
14 include ("file.inc");
33 test fread with file opened in "r" and "rb" mode only
53 echo "Error: failed to fopen() file: $filename!";
71 /* read file by giving size more than its size */
83 // reading 1000 bytes within the file max size
94 var_dump(fclose($file_handle)); // now close the file
97 // delete the file created
98 delete_file($filename); // delete file with name
109 Reading 1024 bytes from file, expecting 1024 bytes ... OK
[all …]
H A Dfgetcsv_variation11.phpt48 echo "Error: failed to create file $filename!\n";
62 // else rewind the file pointer to beginning of the file
67 // rewind the file pointer to bof
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 --
106 -- Testing fgetcsv() with file opened using rb mode --
116 -- Testing fgetcsv() with file opened using rt mode --
126 -- Testing fgetcsv() with file opened using r+ mode --
[all …]
H A D007_variation14.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "a+t" 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_variation14.tmp";
30 $file_handle = fopen($file, "a+t"); //opening the file "a+t" mode
40 unlink($file); //Deleting the file
41 fclose( fopen($file, "a+t") ); //Opening the non-existing file in "a+t" mode, which will be created
[all …]
H A D007_variation21.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "ab" 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_variation21.tmp";
30 $file_handle = fopen($file, "ab"); //opening the file "ab" mode
41 unlink($file); //Deleting the file
42 fclose( fopen($file, "ab") ); //Opening the non-existing file in "ab" mode, which will be created
[all …]
H A D007_variation22.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "a+b" 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_variation22.tmp";
30 $file_handle = fopen($file, "a+b"); //opening the file "a+b" mode
40 unlink($file); //Deleting the file
41 fclose( fopen($file, "a+b") ); //Opening the non-existing file in "a+b" mode, which will be created
[all …]
H A D007_variation5.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "a" 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_variation5.tmp";
30 $file_handle = fopen($file, "a"); //opening the file "a" mode
41 unlink($file); //Deleting the file
42 fclose( fopen($file, "a") ); //Opening the non-existing file in "a" mode, which will be created
[all …]
H A D007_variation6.phpt9 Description: Opens file or URL.
14 Description: Closes an open file pointer
17 /* Test fopen() and fclose(): Opening the file in "a+" 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_variation6.tmp";
30 $file_handle = fopen($file, "a+"); //opening the file "a+" mode
40 unlink($file); //Deleting the file
41 fclose( fopen($file, "a+") ); //Opening the non-existing file in "a+" mode, which will be created
[all …]
H A Dcopy_variation13.phpt6 Description: Makes a copy of the file source to dest.
10 /* Test copy(): Trying to copy dir to an existing file */
14 $file = $file_path."/copy_variation13_dir.tmp";
15 fclose(fopen($file, "w"));
19 echo "*** Testing copy() in copying dir to file ***\n";
20 var_dump( copy($dir, $file) );
22 var_dump( file_exists($file) );
28 var_dump( is_file($file) );
29 var_dump( is_dir($file) );
31 var_dump( filesize($file) );
[all …]
H A Dfgetcsv_variation16.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
78 // close the file
80 //delete file
90 -- Testing fgetcsv() with file opened using r mode --
100 -- Testing fgetcsv() with file opened using rb mode --
110 -- Testing fgetcsv() with file opened using rt mode --
120 -- Testing fgetcsv() with file opened using r+ mode --
[all …]
/PHP-5.5/ext/curl/tests/
H A Dbug27023_2.phpt14 curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
17 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt');
18 $params = array('file' => $file);
22 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain");
23 $params = array('file' => $file);
27 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt");
28 $params = array('file' => $file);
32 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt");
33 $params = array('file' => $file);
/PHP-5.5/tests/security/
H A Dopen_basedir_file.phpt9 test_open_basedir_before("file");
10 test_open_basedir_error("file");
12 var_dump(file("ok.txt"));
13 var_dump(file("../ok/ok.txt"));
14 var_dump(file($initdir."/test/ok/ok.txt"));
15 var_dump(file($initdir."/test/ok/../ok/ok.txt"));
17 test_open_basedir_after("file");
25 *** Testing open_basedir configuration [file] ***
44 Warning: file(..): failed to open stream: %s in %s on line %d
54 Warning: file(/): failed to open stream: %s in %s on line %d
[all …]
/PHP-5.5/ext/spl/tests/
H A DSplFileObject_fwrite_variation_001.phpt5 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt';
6 if(file_exists($file)) {
7 unlink($file);
9 $obj = New SplFileObject($file,'w');
11 var_dump(file_get_contents($file));
15 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt';
16 if(file_exists($file)) {
17 unlink($file);
H A DSplFileObject_fwrite_variation_002.phpt5 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt';
6 if(file_exists($file)) {
7 unlink($file);
9 $obj = New SplFileObject($file,'w');
11 var_dump(file_get_contents($file));
15 $file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt';
16 if(file_exists($file)) {
17 unlink($file);
/PHP-5.5/ext/gd/tests/
H A D001.phpt2 imagecreatefrompng() and empty/missing file
8 $file = dirname(__FILE__)."/001.test";
9 @unlink($file);
11 var_dump(imagecreatefrompng($file));
12 touch($file);
13 var_dump(imagecreatefrompng($file));
15 @unlink($file);
20 Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on …
23 Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
/PHP-5.5/ext/pdo_mysql/tests/
H A Dpdo_mysql___construct_uri.phpt17 $file = $tmp . DIRECTORY_SEPARATOR . 'pdomuri.tst';
21 $uri = sprintf('uri:file:%s', $file);
23 if ($fp = @fopen($file, 'w')) {
24 // ok, great we can create a file with a DSN in it
28 assert(file_exists($file));
34 $file, filesize($file), file_get_contents($file),
37 unlink($file);
40 if ($fp = @fopen($file, 'w')) {
45 assert(file_exists($file));
51 $file, filesize($file), file_get_contents($file),
[all …]
/PHP-5.5/ext/zlib/tests/
H A Dgzfile_variation15.phpt33 gzwrite($h, "This is a file in dir2");
36 // should read dir2 file
40 //create a file in dir1
42 gzwrite($h, "This is a file in dir1");
45 //should now read dir1 file
49 // create a file in working directory
54 //should still read dir1 file
70 //should read the file in script dir
85 string(22) "This is a file in dir2"
90 string(22) "This is a file in dir1"
[all …]

Completed in 44 milliseconds

12345678910>>...70