data:// — Daten (RFC 2397)
Der Stream-Wrapper data: (» RFC 2397).
Beispiel #1 Ausgabe des Inhalts von data://
<?php
// gibt "Ich liebe PHP" aus
echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo=');
?>
Beispiel #2 Abrufen des Medientyps
<?php
$fp = fopen('data://text/plain;base64,', 'r');
$meta = stream_get_meta_data($fp);
// gibt "text/plain" aus
echo $meta['mediatype'];
?>