PHP function stream_wrapper_register()

Availability in versions: PHP 4.3.2

Register a URL wrapper implemented as a PHP class

Parameters

Parameter Data type Default value Note
$protocol string not The wrapper name to be registered.
$classname string not The classname which implements the protocol.
$flags int null Should be set to STREAM_IS_URL if protocol is a URL protocol. Default is 0, local stream.

Return values

bool

Returns true on success, otherwise false on failure.

stream_wrapper_register will return false if the protocol already has a handler.

Additional resources

Official stream-wrapper-register documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.