在PHP中,封装协议(Wrapper Protocols)是一种允许你以类似于文件操作的方式访问各种资源(如HTTP、FTP、文件系统等)的机制。PHP提供了多种内置的封装协议,以下是一些常见的类型:
file:///path/to/file.txt
http://example.com/file.txt
http://
,但使用HTTPS协议进行加密传输。https://example.com/file.txt
ftp://user:password@example.com/file.txt
ftp://
,但使用FTPS协议进行加密传输。ftps://user:password@example.com/file.txt
php://input
, php://output
, php://memory
, php://temp
data://text/plain;base64,SGVsbG8gd29ybGQ=
glob:///path/to/files/*.txt
phar:///path/to/archive.phar/file.txt
zip:///path/to/archive.zip#file.txt
compress.zlib:///path/to/file.gz
compress.bzip2:///path/to/file.bz2
ssh2.shell://user:password@example.com
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
rar:///path/to/archive.rar#file.txt
ogg:///path/to/file.ogg
expect://command
zlib:///path/to/file.gz
bzip2:///path/to/file.bz2
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com
ssh2.tunnel://user:password@example.com
ssh2.shell://user:password@example.com
ssh2.sftp://user:password@example.com/path/to/file.txt
ssh2.scp://user:password@example.com/path/to/file.txt
ssh2.exec://user:password@example.com