No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher une fonction PHP

data://

data://Data (RFC 2397)

Description

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

PHP: data:// - Manual Home of Manuel PHP  Contents Haut

Usage

  • data://text/plain;base64,

PHP: data:// - Manual Home of Manuel PHP  Contents Haut

Options

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

PHP: data:// - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 Print data:// contents

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

Example #2 Fetch the media type

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

// prints "text/plain"
echo $meta['mediatype'];
?>
Find a PHP function
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph