Home
last modified time | relevance | path

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

12345678910>>...89

/php-src/ext/phar/phar/
H A Dphar.php35 function command_include($file) argument
37 $file = 'phar://' . __FILE__ . '/' . $file;
38 if (file_exists($file)) {
39 include($file);
/php-src/ext/standard/tests/file/
H A Dfilestat.phpt2 various file stat func tests
24 var_dump(fileinode("/no/such/file/or/dir"));
25 var_dump(fileowner("/no/such/file/or/dir"));
26 var_dump(filegroup("/no/such/file/or/dir"));
27 var_dump(fileatime("/no/such/file/or/dir"));
28 var_dump(filectime("/no/such/file/or/dir"));
49 Warning: fileinode(): stat failed for /no/such/file/or/dir in %s on line %d
52 Warning: fileowner(): stat failed for /no/such/file/or/dir in %s on line %d
55 Warning: filegroup(): stat failed for /no/such/file/or/dir in %s on line %d
58 Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d
[all …]
H A Dfgetc_variation3.phpt6 Description: Gets character from file pointer
15 include ("file.inc");
17 echo "*** Testing fgetc() with file opened in write only mode ***\n";
26 echo "Error: failed to open file $filename!\n";
32 // rewind the file pointer to beginning of the file
37 // read from file
39 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed
40 var_dump( feof($file_handle) ); // check if end of file pointer is set
42 // close the file
45 // delete the file
[all …]
H A Dunlink_variation1.phpt2 Test unlink() function : usage variations - unlinking file in a directory
13 /* Delete file having default permission but its dir having readonly permission
14 Delete file having readonly permission but dir having default permission
25 echo "\n*** Testing unlink() on file inside a directory ***\n";
28 // create temp file inside $dirname
37 var_dump( file_exists($filename) ); // confirm file is deleted
47 // create the temp file
51 // remove write permission from file
53 // now try deleting temp file inside $dirname
63 *** Testing unlink() on file inside a directory ***
[all …]
H A D007_variation18.phpt6 /* Test fopen() and fclose(): Opening the file in "r+b" 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_variation18.tmp";
19 $file_handle = fopen($file, "r+b"); //opening the file in "r+b" mode
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
24 …ell($file_handle) ); //File pointer position after read operation, expected at the end of the file
26 …ll($file_handle) ); //File pointer position after write operation, expected at the end of the file
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
H A D007_variation2.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_variation2.tmp";
19 $file_handle = fopen($file, "r+"); //opening the file in "r+" mode
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
24 …ell($file_handle) ); //File pointer position after read operation, expected at the end of the file
26 …ll($file_handle) ); //File pointer position after write operation, expected at the end of the file
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
H A D007_variation10.phpt6 /* Test fopen() and fclose(): Opening the file in "r+t" 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_variation10.tmp";
19 $file_handle = fopen($file, "r+t"); //opening the file in "r+t" mode
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
24 …ell($file_handle) ); //File pointer position after read operation, expected at the end of the file
26 …ll($file_handle) ); //File pointer position after write operation, expected at the end of the file
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
H A Dstream_001.phpt6 var_dump(stream_wrapper_unregister('file'));
7 var_dump(fopen("file://".__FILE__, "r"));
8 var_dump(stream_wrapper_restore('file'));
9 var_dump(fopen("file://".__FILE__, "r"));
16 Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configur…
18 Warning: fopen(): file:// wrapper is disabled in the server configuration in %s on line %d
20 Warning: fopen(file://%s): Failed to open stream: no suitable wrapper could be found in %s on line …
H A Dfgets_variation1.phpt11 include ("file.inc");
13 echo "*** Testing fgets() with file opened in write only mode ***\n";
22 echo "Error: failed to open file $filename!\n";
28 // rewind the file pointer to beginning of the file
33 // read from file
35 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed
36 var_dump( feof($file_handle) ); // check if end of file pointer is set
38 // close the file
41 // delete the file
48 *** Testing fgets() with file opened in write only mode ***
[all …]
H A Dfile_get_contents_basic.phpt9 include($file_path."/file.inc");
13 echo "-- Testing with simple valid data file --\n";
16 create_files($file_path, 1, "text", 0755, 100, "w", "file", 1, "byte");
20 echo "\n-- Testing with empty file --\n";
22 create_files($file_path, 1, "empty", 0755, 100, "w", "file", 1, "byte");
30 include($file_path."/file.inc");
35 -- Testing with simple valid data file --
38 -- Testing with empty file --
H A Dstat_variation3-win32.phpt2 Test stat() functions: usage variations - effects of creating/deleting the dir/file
12 /* test the effects of creating & deleting of subdir/file on the stats of dir/file */
15 require "$file_path/file.inc";
18 /* create temp file and directory */
21 echo "*** Testing stat(): with creating & deleting subdir/file ***\n";
24 echo "-- Testing stat() on dir after subdir and file is created in it --\n";
46 // comparing stats after the deletion of subdir and file
47 echo "-- Testing stat() for comparing stats after the deletion of subdir and file --\n";
63 *** Testing stat(): with creating & deleting subdir/file ***
64 -- Testing stat() on dir after subdir and file is created in it --
[all …]
H A Dfile_basic.phpt2 Test file() function : basic functionality
6 * Description: Reads entire file into an array
8 require(__DIR__ . '/file.inc');
10 echo "*** Testing file() with basic types of files ***\n";
15 print_r( file($file_path."/file_basic1.tmp") );
19 echo "*** Testing for return type of file() function ***\n";
22 $ret_arr = file($file_path."/file_basic1.tmp");
30 *** Testing file() with basic types of files ***
68 *** Testing for return type of file() function ***
H A Dlstat_stat_variation21.phpt12 /* test the effects of truncate() on stats of a file */
15 require "$file_path/file.inc";
18 /* create temp file */
20 $fp = fopen($filename, "w"); // temp file
23 /* ftruncate the current file and check stat() on the file */
25 echo "*** Testing stat() on file by truncating it to given size ***\n";
30 // opening file in r/w mode
51 *** Testing stat() on file by truncating it to given size ***
H A Dstat_variation5-win32.phpt2 Test stat() functions: usage variations - file opened in read/write mode
12 /* test the stats of file opened in write mode and then same in read mode */
15 require "$file_path/file.inc";
18 $file_handle = fopen("$file_path/stat_variation5.tmp", "w"); // temp file
22 echo "\n*** Testing stat(): on a file with read/write permission ***\n";
25 $file_handle = fopen($filename, "w"); // create file
31 // opening file again in read mode
32 $file_handle = fopen($filename, "r"); // read file
53 *** Testing stat(): on a file with read/write permission ***
H A Duserwrapper.phpt8 function unlink($file) {
9 print "Unlinking file: $file\n";
25 /* By printing out a notice that we are actively stating the file
28 print "Stating file: $path\n";
38 unlink('test://example.com/path/to/file');
44 print_r(stat('test://example.com/path/to/file'));
45 echo "Filesize = " . filesize('test://example.com/path/to/file') . "\n";
46 echo "filemtime = " . filemtime('test://example.com/path/to/file') . "\n";
49 Unlinking file: test://example.com/path/to/file
53 Stating file: test://example.com/path/to/file
/php-src/ext/standard/tests/dir/
H A Dreaddir_variation6.phpt12 // include the file.inc for Function: function create_files()
13 include( __DIR__."/../file/file.inc");
30 while (FALSE !== ($file = readdir($dir_handle1))) {
31 $a[] = $file;
34 foreach ($a as $file) {
35 var_dump($file);
40 while (FALSE !== ($file = readdir())) {
41 $a[] = $file;
44 foreach ($a as $file) {
45 var_dump($file);
H A Dclosedir_variation3.phpt2 Test closedir() function : usage variations - close a file pointer
6 * Create a file pointer using fopen() then try to close it using closedir()
11 echo "\n-- Open a file using fopen() --\n";
14 echo "\n-- Try to close the file pointer using closedir() --\n";
20 echo "\n-- Check file pointer: --\n";
30 -- Open a file using fopen() --
33 -- Try to close the file pointer using closedir() --
36 -- Check file pointer: --
H A Dreaddir_variation6-win32-mb.phpt18 // include the file.inc for Function: function create_files()
19 include( __DIR__."/../file/file.inc");
36 while (FALSE !== ($file = readdir($dir_handle1))) {
37 $a[] = $file;
40 foreach ($a as $file) {
41 var_dump($file);
46 while (FALSE !== ($file = readdir())) {
47 $a[] = $file;
50 foreach ($a as $file) {
51 var_dump($file);
/php-src/sapi/phpdbg/
H A Dphpdbg_parser.y86 $$.file.name = $2.str;
87 $$.file.line = $3.num;
91 $$.file.name = $1.str;
92 $$.file.line = $4.num;
97 if ($$.file.name) {
98 memcpy(&$$.file.name[0], $1.str, $1.len);
100 $$.file.name[$1.len + $2.len] = '\0';
102 $$.file.line = $4.num;
107 if ($$.file.name) {
110 $$.file.name[$1.len + $2.len] = '\0';
[all …]
/php-src/ext/standard/tests/image/
H A Diptcembed_001.phpt2 iptcembed() and wrong file
6 $file = __DIR__.'/iptcembed_001.data';
7 $fp = fopen($file, "w");
11 var_dump(iptcembed(-1, $file, -1));
12 unlink($file);
H A Dimage_type_to_mime_type.phpt13 while (($file = readdir($dir)) !== FALSE) {
14 if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") {
15 $files[] = $file;
20 foreach($files as $file) {
21 $result[$file] = getimagesize(__DIR__."/$file");
22 $result[$file] = image_type_to_mime_type($result[$file][2]);
/php-src/ext/standard/tests/streams/
H A Dstream_resolve_include_path.phpt8 $include_path_file = $include_path . DIRECTORY_SEPARATOR . 'file';
9 $include_path_nested_file = $include_path_nested . DIRECTORY_SEPARATOR . 'file';
18 var_dump(stream_resolve_include_path('file-does-not-exist'));
21 var_dump(stream_resolve_include_path('file'));
23 var_dump(stream_resolve_include_path('file'));
30 $include_path_file = $include_path . DIRECTORY_SEPARATOR . 'file';
31 $include_path_nested_file = $include_path_nested . DIRECTORY_SEPARATOR . 'file';
/php-src/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']);
32 ["file"]=>
/php-src/ext/standard/tests/file/windows_mb_path/
H A Dbug75063_cp1251.phpt2 Bug #75063 Many filesystem-related functions do not work with multibyte file names, cp1251
17 /* This file is in cp1251. */
42 while ((\$file = readdir(\$dh)) !== false) {
43 if ("." == \$file || ".." == \$file) continue;
44 var_dump(\$file);
62 foreach ($obj as $file) {
63 if ("." == $file || ".." == $file) continue;
64 unlink($d0 . DIRECTORY_SEPARATOR . $file);
/php-src/ext/spl/tests/SplFileObject/
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);

Completed in 32 milliseconds

12345678910>>...89