blob: 4fa9ea8a37a3d67bd16b9afcc92857863b5db093 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--TEST--
Stream wrapper
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80200) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini
--FILE--
<?php
class qwe {
function stream_open($fname) {
return $fname;
}
}
stream_wrapper_register("lelel", "qwe");
stream_wrapper_register("lolol", "qwe");
fopen("lelel://asdasd", "r");
fopen("lolol://asdasd", "r");
?>
--EXPECTF--
Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_register.php on line %d
Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d
Warning: fopen(lolol://asdasd): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d
|