Home
last modified time | relevance | path

Searched refs:file_handle (Results 1 – 25 of 503) sorted by relevance

12345678910>>...21

/PHP-5.5/Zend/
H A Dzend_stream.c114 if (file_handle->type == ZEND_HANDLE_STREAM || file_handle->type == ZEND_HANDLE_MAPPED) { in zend_stream_fsize()
115 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle TSRMLS_CC); in zend_stream_fsize()
117 if (file_handle->handle.fp && fstat(fileno(file_handle->handle.fp), &buf) == 0) { in zend_stream_fsize()
156 if (!zend_stream_is_mmap(file_handle) && file_handle->handle.stream.isatty) {
187 if (zend_stream_open(file_handle->filename, file_handle TSRMLS_CC) == FAILURE) {
195 file_handle->handle.fp = fdopen(file_handle->handle.fd, "rb");
206 memset(&file_handle->handle.stream.mmap, 0, sizeof(file_handle->handle.stream.mmap));
227 old_type = file_handle->type;
292 file_handle->handle.stream.mmap.old_handle = file_handle->handle.stream.handle;
293 file_handle->handle.stream.mmap.old_closer = file_handle->handle.stream.closer;
[all …]
H A Dzend_dtrace.c36 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC) in dtrace_compile_file() argument
39 DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, (char *)file_handle->filename); in dtrace_compile_file()
40 res = compile_file(file_handle, type TSRMLS_CC); in dtrace_compile_file()
41 DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, (char *)file_handle->filename); in dtrace_compile_file()
/PHP-5.5/sapi/apache_hooks/
H A Dsapi_apache.c30 zend_file_handle file_handle; in apache_php_module_main() local
48 file_handle.type = ZEND_HANDLE_FILENAME; in apache_php_module_main()
49 file_handle.handle.fd = 0; in apache_php_module_main()
50 file_handle.filename = SG(request_info).path_translated; in apache_php_module_main()
51 file_handle.opened_path = NULL; in apache_php_module_main()
52 file_handle.free_filename = 0; in apache_php_module_main()
53 (void) php_execute_script(&file_handle TSRMLS_CC); in apache_php_module_main()
65 zend_file_handle file_handle; in apache_php_module_hook() local
87 memset(&file_handle, 0, sizeof(file_handle)); in apache_php_module_hook()
88 file_handle.type = ZEND_HANDLE_FILENAME; in apache_php_module_hook()
[all …]
/PHP-5.5/sapi/apache/
H A Dsapi_apache.c31 zend_file_handle file_handle; in apache_php_module_main() local
47 file_handle.type = ZEND_HANDLE_FILENAME; in apache_php_module_main()
48 file_handle.handle.fd = 0; in apache_php_module_main()
49 file_handle.filename = SG(request_info).path_translated; in apache_php_module_main()
50 file_handle.opened_path = NULL; in apache_php_module_main()
51 file_handle.free_filename = 0; in apache_php_module_main()
53 (void) php_execute_script(&file_handle TSRMLS_CC); in apache_php_module_main()
/PHP-5.5/ext/standard/tests/file/
H A Dfscanf_error.phpt15 $file_handle = fopen($filename, 'w');
16 if ($file_handle == false)
18 fwrite($file_handle, "hello world");
19 fclose($file_handle);
26 if ($file_handle == false)
28 var_dump( fscanf($file_handle) );
29 fclose($file_handle);
36 if ($file_handle == false)
39 fclose($file_handle);
50 if ($file_handle == false)
[all …]
H A Dfscanf_variation1.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
22 @fwrite($file_handle, "hello_world ");
23 @fwrite($file_handle, 12345);
24 fclose($file_handle);
27 $file_handle = fopen($filename, "r");
29 $return_value = fscanf($file_handle, "%s");
31 fclose($file_handle);
H A Dfilesize_variation4-win32.phpt25 $file_handle = fopen($filename, "w");
27 fwrite($file_handle, $string);
28 fclose($file_handle);
35 fwrite($file_handle, $string);
36 fclose($file_handle);
41 $file_handle = fopen($filename, "a");
42 fwrite($file_handle, "Hello, world");
43 fclose($file_handle);
50 fclose($file_handle);
57 fclose($file_handle);
[all …]
H A Dfscanf_variation54.phpt32 $file_handle = fopen($filename, "w");
33 if($file_handle == false)
36 fwrite($file_handle, $obj);
39 fclose($file_handle);
47 $file_handle = fopen($filename, "r");
48 if($file_handle == false) {
54 var_dump( fscanf($file_handle,$format) );
55 rewind($file_handle);
58 fclose($file_handle);
H A Dfgets_variation2.phpt22 $file_handle = fopen(__FILE__, "r");
24 fclose($file_handle);
27 var_dump( fgets($file_handle) ); // default length
28 var_dump( fgets($file_handle, 10) ); // with specific length
32 $file_handle = fopen(__FILE__, "r");
34 unset($file_handle);
37 var_dump( fgets($file_handle) ); // default length
38 var_dump( fgets($file_handle, 10) ); // with specific length
53 Notice: Undefined variable: file_handle in %s on line %d
58 Notice: Undefined variable: file_handle in %s on line %d
H A D007_variation15.phpt28 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea…
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation23.phpt28 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea…
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation7.phpt28 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation8.phpt28 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea…
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A Dfilesize_variation4.phpt27 $file_handle = fopen($filename, "w");
29 fwrite($file_handle, $string);
30 fclose($file_handle);
37 fwrite($file_handle, $string);
38 fclose($file_handle);
43 $file_handle = fopen($filename, "a");
44 fwrite($file_handle, "Hello, world");
45 fclose($file_handle);
52 fclose($file_handle);
59 fclose($file_handle);
[all …]
H A D007_variation16.phpt28 $file_handle = fopen($file, "x+t"); //opening the non-existing file in "x+t" mode, file will be cr…
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation24.phpt28 $file_handle = fopen($file, "x+b"); //opening the non-existing file in "x+b" mode, file will be cr…
29 var_dump($file_handle); //Check for the content of handle
30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
34 rewind($file_handle);
35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation10.phpt30 $file_handle = fopen($file, "r+t"); //opening the file in "r+t" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
36 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
37 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
38 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
39 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation18.phpt30 $file_handle = fopen($file, "r+b"); //opening the file in "r+b" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
36 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
37 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
38 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
39 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation2.phpt30 $file_handle = fopen($file, "r+"); //opening the file in "r+" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
36 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
37 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
38 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
39 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation1.phpt30 $file_handle = fopen($file, "r"); //opening the file in "r" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial position of file pointer
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails; expected: 0 bytes
36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
37 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation17.phpt30 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial position of file pointer
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails; expected: 0 bytes
36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
37 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation9.phpt30 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode
31 var_dump($file_handle); //Check for the content of handle
32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
33 var_dump( ftell($file_handle) ); //Initial position of file pointer
34 var_dump( fread($file_handle, 100) ); //Check for read operation
35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails; expected: 0 bytes
36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
37 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A Dpopen_pclose_basic.phpt29 $file_handle = popen(CMD, 'r');
30 fpassthru($file_handle);
31 pclose($file_handle);
37 $file_handle = popen($command, "r");
38 $return_value = fpassthru($file_handle);
41 pclose($file_handle);
46 $file_handle = popen("sort", "w");
50 fwrite($file_handle, (binary)$str);
51 fwrite($file_handle, (binary)$newline);
53 pclose($file_handle);
H A Dflock_basic.phpt14 $file_handle = fopen("$file_path/lock.tmp", "w");
15 var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
16 var_dump(flock($file_handle, LOCK_UN));
17 var_dump(flock($file_handle, LOCK_EX));
18 var_dump(flock($file_handle, LOCK_UN));
19 fclose($file_handle);
H A Dfflush_variation4.phpt25 $file_handle = fopen($file_name, "w");
26 if($file_handle == false)
28 fclose($file_handle);
31 $file_handle = fopen($file_name, $mode);
32 if($file_handle == false)
34 var_dump( fflush($file_handle) );
35 fclose($file_handle);

Completed in 115 milliseconds

12345678910>>...21