Home
last modified time | relevance | path

Searched refs:file (Results 251 – 275 of 1994) sorted by relevance

1...<<11121314151617181920>>...80

/PHP-7.4/ext/standard/tests/file/
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 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 Dbug65272.phpt6 $file = __DIR__."/flock_bug65272.dat";
8 $fp1 = fopen($file, "w");
11 $fp2 = fopen($file, "r");
19 $file = __DIR__."/flock_bug65272.dat";
20 unlink($file);
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 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";
51 *** Testing lstat() on a file after changing its access permission ***
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 Dbug44805.phpt9 file_put_contents($file1, "this is file 1");
10 file_put_contents($file2, "this is file 2");
14 echo "reading file 2: ";
24 reading file 2: this is file 1
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_variation5-win32-mb.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
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
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(__DIR__ . '/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 Drename_variation3-win32.phpt12 Description: Renames a file or directory
15 require __DIR__.'/file.inc';
22 /* test rename() by trying to rename an existing file/dir to the same name
32 echo "\n-- Renaming file to same file name --\n";
40 echo "\n-- Renaming existing file to existing directory name --\n";
45 echo "\n-- Renaming existing directory to existing file name --\n";
64 -- Renaming file to same file name --
72 -- Renaming existing file to existing directory name --
79 -- Renaming existing directory to existing file name --
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";
78 *** Testing stat(): on file and directory after accessing it
85 -- Testing on file --
/PHP-7.4/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
53 if (!$fp = fopen($file, 'w')) {
55 printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file);
66 printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file);
72 if (!chmod($file, 0644)) {
75 $offset, $file);
[all …]
/PHP-7.4/ext/spl/tests/
H A Dspl_fileinfo_getextension_leadingdot.phpt5 $file = __DIR__ . '/.test';
6 touch($file);
7 $fileInfo = new SplFileInfo($file);
10 unlink($file);
H A DSplFileObject_fputcsv_variation15.phpt9 $file = new SplTempFileObject;
11 $file->fputcsv($record, ',', '"', '');
13 $file->rewind();
14 foreach ($file as $line) {
/PHP-7.4/Zend/tests/
H A Dbug52508.phpt6 $file = __DIR__ .'/bug52508.ini';
8 file_put_contents($file, "a = 1");
10 $ini_array = parse_ini_file($file, true, INI_SCANNER_RAW);
13 unlink($file);
/PHP-7.4/sapi/phpdbg/
H A Dphpdbg_list.c61 efree(file); in PHPDBG_LIST()
65 zend_string *file; in PHPDBG_LIST() local
67 const char *abspath = param->file.name; in PHPDBG_LIST()
72 phpdbg_list_file(file, param->file.line, 0, 0); in PHPDBG_LIST()
73 zend_string_release(file); in PHPDBG_LIST()
285 char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename); in phpdbg_init_compile_file()
293 if (file->opened_path) { in phpdbg_init_compile_file()
297 if (file->free_filename) { in phpdbg_init_compile_file()
298 efree((char *) file->filename); in phpdbg_init_compile_file()
300 file->free_filename = 0; in phpdbg_init_compile_file()
[all …]
/PHP-7.4/ext/standard/tests/file/windows_mb_path/
H A Dtest_long_path_bug70943.phpt2 Bug #70943 fopen() can't open a file if path is 259 characters long
13 // Generates a sample file whose path is exactly 259 characters long
15 echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n";
18 echo "Opening file... ";
29 Generating a file with a path length of 259 characters...
30 Opening file... OK
/PHP-7.4/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.4/ext/xmlreader/tests/
H A D007.phpt10 $file = __DIR__ . '/_007.xml';
11 file_put_contents($file, $xmlstring);
14 $reader->open($file);
20 print "file relaxNG: ok\n";
22 print "file relaxNG: failed\n";
25 unlink($file);
52 file relaxNG: ok
/PHP-7.4/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
/PHP-7.4/tests/lang/
H A Dbug38579.phpt2 Bug #38579 (include_once() may include the same file twice)
11 $file = __DIR__."/bug38579.inc";
12 include_once(strtolower($file));
13 include_once(strtoupper($file));

Completed in 43 milliseconds

1...<<11121314151617181920>>...80