PharData::addFile

PharData::addFile

(PHP >= 5.3.0, PECL phar >= 2.0.0)

PharData::addFileAdd a file from the filesystem to the tar/zip archive

Description

public void Phar::addFile ( string $file [, string $localname ] )

With this method, any file or URL can be added to the tar/zip archive. If the optional second parameter localname is specified, the file will be stored in the archive with that name, otherwise the file parameter is used as the path to store within the archive. URLs must have a localname or an exception is thrown. This method is similar to 登录查看完整内容