Warning: file_put_contents(): Only -1 of 44 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
Data (RFC 2397) Podręcznik PHP Poprzedni Dodatek M. List of Supported Protocols/Wrappers Następny The data: ( RFC 2397 ) stream wrapper is available since 5.2.0. Przykład M-4. Print data://...
Forum und email
Data (RFC 2397)

Data (RFC 2397)

The data: (RFC 2397) stream wrapper is available since PHP 5.2.0.

Przykład M-4. Print data:// contents

<?php
// prints "I love PHP"
echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo=');
?>

Przykład M-5. Fetch the media type

<?php
$fp   
= fopen('data://text/plain;base64,', 'r');
$meta = stream_get_meta_data($fp);

// prints "text/plain"
echo $meta['mediatype'];
?>

Tabela M-8. Wrapper Summary

AttributeSupported
Restricted by allow_url_fopenNo
Restricted by allow_url_includeYes
Allows ReadingYes
Allows WritingNo
Allows AppendingNo
Allows Simultaneous Reading and WritingNo
Supports stat()No
Supports unlink()No
Supports rename()No
Supports mkdir()No
Supports rmdir()No