企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# C.68 PharPackageTask [Phar](http://www.php.net/manual/en/book.phar.php) packages generating with Phing. This task require [PECL's Phar](http://pecl.php.net/package/phar) extension to be installed on your system. Phar is built-in in PHP from 5.3 version. Table C.88:聽Attributes NameTypeDescriptionDefaultRequired`basedir``String`Base directory, which will be deleted from each included file (from path). Paths with deleted `basedir` part are local paths in package.n/aYes`destfile``String`Destination (output) file. Will be recreated, if exists!n/aYes`compression``String`Compression type (gzip, bzip2, none) to apply to the packed files.noneNo`webstub``String`Relative path within the phar package to run, if accessed through a web browser.n/aNo`clistub``String`Relative path within the phar package to run, if accessed on the command line.n/aNo`stub``String`A path to a php file that contains a custom stubn/aNo`alias``String`An alias to assign to the phar packagen/aNo`signature``String`Signature algorithm (md5, sha1, sha256, sha512), used for this package.sha1No`key``String`The private key to sign the phar package with (PEM or PKCS#12 encoded)n/aNo`keyPassword``String`The password to use for the private keyn/aNo C.68.1 Example Sample build command: ``` <pharpackage destfile="./build/package.phar" basedir="./"> <fileset dir="./classes"> <include name="**/**" /> </fileset> <metadata> <element name="version" value="1.0" /> <element name="authors"> <element name="John Doe"> <element name="e-mail" value="john@example.com" /> </element> </element> </metadata> </pharpackage> ``` C.68.2 Supported Nested Tags - `fileset` - `metadata`