Home
last modified time | relevance | path

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

12345678910>>...89

/php-src/ext/zip/tests/
H A Dbug_gh8781.phpt2 Bug GH-8781 (ZipArchive deletes zip file with no contents)
7 touch($file = __DIR__ . '/bug_gh8781.zip');
8 var_dump(is_file($file));
11 $zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE);
14 var_dump(is_file($file));
/php-src/ext/standard/tests/file/
H A Dfgetcsv_variation17.phpt40 echo "Error: failed to create file $filename!\n";
53 // else rewind the file pointer to beginning of the file
58 // rewind the file pointer to bof
69 // check the file pointer position and if eof
75 // check the file pointer position and if eof
79 // close the file
81 //delete file
91 -- Testing fgetcsv() with file opened using r mode --
107 -- Testing fgetcsv() with file opened using rb mode --
123 -- Testing fgetcsv() with file opened using rt mode --
[all …]
H A Dfgetcsv_variation6.phpt45 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
75 // 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 D007_variation17.phpt6 /* Test fopen() and fclose(): Opening the file in "rb" mode,
7 checking for the file creation, write & read operations,
8 checking for the file pointer position,
12 require($file_path."/file.inc");
15 $file = $file_path."/007_variation17.tmp";
19 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
42 Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
H A D007_variation1.phpt6 /* Test fopen() and fclose(): Opening the file in "r" mode,
7 checking for the file creation, write & read operations,
8 checking for the file pointer position,
12 require($file_path."/file.inc");
15 $file = $file_path."/007_variation1.tmp";
19 $file_handle = fopen($file, "r"); //opening the file in "r" mode
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
42 Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
H A D007_variation9.phpt6 /* Test fopen() and fclose(): Opening the file in "rt" mode,
7 checking for the file creation, write & read operations,
8 checking for the file pointer position,
12 require($file_path."/file.inc");
15 $file = $file_path."/007_variation9.tmp";
19 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
42 Notice: fwrite(): Write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
H A Dfgetcsv_variation23.phpt2 Test fgetcsv() : usage variations - empty file
5 /* Testing fgetcsv() to read from an empty file */
7 echo "*** Testing fgetcsv() : reading from file which is having zero content ***\n";
9 // try reading from file which is having zero content
10 // create the file and then open in read mode and try reading
16 echo "Error: failed to create file $filename!\n";
28 // close and delete the file
34 *** Testing fgetcsv() : reading from file which is having zero content ***
H A Dcopy_variation11.phpt5 /* Test copy(): Trying to copy the file to a destination, where destination is an existing dir */
9 echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n";
10 $file = $file_path."/copy_variation11.tmp";
11 $file_handle = fopen($file, "w");
19 var_dump( filesize($file) ); //size of source before copy
26 var_dump( copy($file, $dir) ); //expected: bool(false)
28 var_dump( file_exists($file) ); //expected: bool(true)
31 var_dump( is_file($file) ); //expected: bool(true)
32 var_dump( is_dir($file) ); //expected: bool(false)
37 var_dump( filesize($file) ); //size of source after copy
[all …]
H A Dbug53848.phpt5 $file = __DIR__ . "/bug53848.csv";
6 @unlink($file);
7 file_put_contents($file, "a,b\n c, d");
8 $fp = fopen($file, "r");
11 @unlink($file);
H A Dlstat_stat_variation13.phpt2 Test lstat() and stat() functions: usage variations - file opened using w and r mode
9 /* use stat on file created using "w" and "r" mode of fopen */
12 require "$file_path/file.inc";
17 echo "*** Checking stat() on a file opened using read/write mode ***\n";
18 $file_handle = fopen($filename, "w"); // create file
24 // opening file again in read mode
25 $file_handle = fopen($filename, "r"); // read file
42 *** Checking stat() on a file opened using read/write mode ***
H A Dfilesize_variation2-win32.phpt12 require($file_path."/file.inc");
16 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
22 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
37 echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
38 // create only the file, as base and subdir is already created
41 fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
49 // size of file inside subdir
65 *** Testing size of a dir, sub-dir and file with filesize() ***
68 -- Creating a file inside base dir, and checking dir & file size --
74 -- Creating a file inside sub-dir, and checking size of base, subdir and file created --
H A Dfilesize_variation2.phpt12 require($file_path."/file.inc");
16 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n";
22 echo "-- Creating a file inside base dir, and checking dir & file size --\n";
37 echo "-- Creating a file inside sub-dir, and checking size of base, subdir and file created --\n";
38 // create only the file, as base and subdir is already created
41 fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes
49 // size of file inside subdir
65 *** Testing size of a dir, sub-dir and file with filesize() ***
68 -- Creating a file inside base dir, and checking dir & file size --
74 -- Creating a file inside sub-dir, and checking size of base, subdir and file created --
H A Dfscanf_variation54.phpt6 /* Test fscanf() to scan a file to read objects */
10 echo "*** Test fscanf(): to read objects from a file ***\n";
25 // create a file
29 exit("Error:failed to open file $filename");
30 //writing object to the file
33 //closing the file
41 // opening file for read
44 exit("Error:failed to open file $filename");
63 *** Test fscanf(): to read objects from a file ***
/php-src/ext/spl/tests/
H A DSplFileInfo_getExtension_basic-win32.phpt9 $file = md5('SplFileInfo::getExtension');
12 touch($file . $ext);
13 $info = new SplFileInfo($file . $ext);
14 var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION));
19 $file = md5('SplFileInfo::getExtension');
22 @unlink($file . $ext);
H A DSplFileInfo_getExtension_basic.phpt9 $file = md5('SplFileInfo::getExtension');
12 touch($file . $ext);
13 $info = new SplFileInfo($file . $ext);
14 var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION));
19 $file = md5('SplFileInfo::getExtension');
22 @unlink($file . $ext);
/php-src/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(__DIR__."/$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(__DIR__."/$file");
/php-src/ext/standard/tests/url/
H A Dparse_url_basic_002.phpt48 --> http://www.php.net:80/this/is/a/very/deep/directory/../file.php : string(4) "http"
72 --> zlib:/path/to/my/file/file.txt : string(4) "zlib"
79 --> file:///path/to/file : string(4) "file"
80 --> file://path/to/file : string(4) "file"
81 --> file:/path/to/file : string(4) "file"
98 --> file:///: : string(4) "file"
99 --> file:///a:/ : string(4) "file"
100 --> file:///ab:/ : string(4) "file"
101 --> file:///a:/ : string(4) "file"
102 --> file:///@:/ : string(4) "file"
[all …]
/php-src/ext/standard/tests/streams/
H A Dbug70362.phpt7 $file = __DIR__ . '/bug70362.txt';
10 var_dump(copy($data, $file));
11 echo file_get_contents($file);
15 $file = __DIR__ . '/bug70362.txt';
16 @unlink($file);
/php-src/ext/mysqli/tests/
H A Dlocal_infile_tools.inc3 function shutdown_clean($file) {
4 if ($file) {
5 unlink($file);
36 if (!$file) {
59 // create a CVS file
61 if (!$fp = fopen($file, 'w')) {
63 printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file);
74 printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file);
80 if (!chmod($file, 0644)) {
83 $offset, $file);
[all …]
/php-src/ext/phar/tests/
H A Dphar_copy.phpt16 $iname = '/file.txt';
77 file "notexisting" cannot be copied to file "another", file does not exist in %sphar_copy2.phar.php
78 file "a" cannot be copied to file "b", file must not already exist in phar %sphar_copy2.phar.php
80 file "d" cannot be copied to file ".phar/stub.php", cannot copy to Phar meta-file in %sphar_copy2.p…
81 file ".phar/stub.php" cannot be copied to file "d", cannot copy Phar meta-file in %sphar_copy2.phar…
/php-src/sapi/cgi/tests/
H A D002.phpt14 $file = __DIR__."/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-src/ext/standard/tests/general_functions/
H A Dbug41445_1.phpt6 $file = __DIR__."/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-src/ext/standard/tests/strings/
H A Dsha1_file.phpt9 /* Creating an empty file */
13 /* Creating a data file */
17 /* Writing into file */
19 $content = "Add this to the file\n";
22 echo "Cannot write to file ($filename)";
54 echo "\n-- Hexadecimal Output for Empty file as Argument --\n";
57 echo "\n-- Raw Binary Output for Empty file as Argument --\n";
94 -- Hexadecimal Output for Empty file as Argument --
97 -- Raw Binary Output for Empty file as Argument --
100 -- Hexadecimal Output for a valid file with some contents --
[all …]
/php-src/ext/dba/
H A Ddba_cdb.c50 php_stream *file; member
53 int file; member
62 php_stream* file = 0; in DBA_OPEN_FUNC() local
65 int file = 0; in DBA_OPEN_FUNC()
74 file = info->fp; in DBA_OPEN_FUNC()
77 if (file < 0) { in DBA_OPEN_FUNC()
86 file = info->fp; in DBA_OPEN_FUNC()
105 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC()
109 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC()
111 cdb->file = file; in DBA_OPEN_FUNC()
[all …]

Completed in 83 milliseconds

12345678910>>...89