PHP: Data (RFC 2397) - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Secure Shell 2 Compression Streams

Last updated: Sat, 27 Jan 2007

view this page in

# Data (RFC 2397)

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

Пример M-4. Print data:// contents

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

Пример 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'];
?>`

Таблица M-8. Wrapper Summary

Attribute | Supported
--- | ---
Restricted by allow_url_fopen | No
Restricted by allow_url_include | Yes
Allows Reading | Yes
Allows Writing | No
Allows Appending | No
Allows Simultaneous Reading and Writing | No
Supports stat() | No
Supports unlink() | No
Supports rename() | No
Supports mkdir() | No
Supports rmdir() | No

add a note User Contributed Notes
Data (RFC 2397)
There are no user contributed notes for this page.
Secure Shell 2 Compression Streams

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST