©
本文檔使用 php中文網手册 發布
(PHP >= 5.3.0, PECL phar >= 2.0.0)
The PharData class provides a high-level interface to accessing and creating non-executable tar and zip archives. Because these archives do not contain a stub and cannot be executed by the phar extension, it is possible to create and manipulate regular zip and tar files using the PharData class even if phar.readonly php.ini setting is 1.
$dirname
)$file
[, string $localname
] )$localname
, string $contents
)$base_dir
[, string $regex
] )$iter
[, string $base_directory
] )$compression
[, string $extension
] )$compression
)$fname
[, int $flags
[, string $alias
[, int $format
= Phar::TAR
]]] )$format
[, int $compression
[, string $extension
]]] )$format
[, int $compression
[, string $extension
]]] )$oldfile
, string $newfile
)$extension
] )$entry
)$pathto
[, string|array $files
[, bool $overwrite
= false
]] )$offset
, string $value
)$offset
)$alias
)$index
[, string $webindex
]] )$metadata
)$sigtype
)$stub
[, int $len
= -1
] )$dirname
)$file
[, string $localname
] )$localname
, string $contents
)$base_dir
[, string $regex
] )$iter
[, string $base_directory
] )$type
= 0
] )$compression
[, string $extension
] )$compression
)$fname
[, int $flags
[, string $alias
]] )$format
= 9021976
[, int $compression
= 9021976
[, string $extension
]]] )$format
= 9021976
[, int $compression
= 9021976
[, string $extension
]]] )$oldfile
, string $newfile
)$indexfile
[, string $webindexfile
]] )$extension
] )$entry
)$pathto
[, string|array $files
[, bool $overwrite
= false
]] )$format
)$filename
[, bool $executable
= true
] )$filename
[, string $alias
] )$alias
[, int $dataoffset
= 0
]] )$pharpath
, string $externalpath
)$munglist
)$offset
)$offset
)$offset
, string $value
)$offset
)$retphar
= true
] )$alias
)$index
[, string $webindex
]] )$metadata
)$sigtype
[, string $privatekey
] )$stub
[, int $len
= -1
] )$archive
)$alias
[, string $index
= "index.php"
[, string $f404
[, array $mimetypes
[, callable $rewrites
]]]]] )