Home > Backend Development > PHP Tutorial > Protocols and encapsulation protocols supported by php

Protocols and encapsulation protocols supported by php

伊谢尔伦
Release: 2016-11-22 10:52:59
Original
1514 people have browsed it

PHP comes with many built-in URL-style wrapper protocols that can be used for file system functions like fopen(), copy(), file_exists() and filesize(). In addition to these packaging protocols, custom packaging protocols can also be registered through stream_wrapper_register().

Note: The URL syntax used to describe an encapsulation protocol only supports scheme://... syntax. scheme:/ and scheme: syntax are not supported.

file:// — access the local file system

http:// — access HTTP(s) URLs

ftp:// — access FTP(s) URLs

php:// — access individual input/output streams (I/O streams)

zlib:// — Compressed streams

data:// — Data (RFC 2397)

glob:// — Find matching file path patterns

phar:// — PHP archive

ssh2:// — Secure Shell 2

rar:// — RAR

ogg:// — Audio streaming

expect:// — Handle interactive streams


Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template