PharFileInfo::__construct() - PharFileInfo类
PharFileInfo::__construct()
(PHP 5 >= 5.3.0, PHP 7, PECL phar >= 1.0.0)
Construct a Phar entry object
说明
publicPharFileInfo::__construct(string $entry)This should not be called directly. Instead, a PharFileInfo object is initialized by calling Phar::offsetGet() through array access.
参数
$entryThe full url to retrieve a file. If you wish to retrieve the information for the filemy/file.phpfrom the pharboo.phar, the entry should bephar://boo.phar/my/file.php.
错误/异常
Throws BadMethodCallException if __construct() is called twice. Throws UnexpectedValueException if the phar URL requested is malformed, the requested phar cannot be opened, or the file can't be found within the phar.
范例
A PharFileInfo::__construct() example
以上例程会输出:
line number 1: hi line number 2: there line number 3: dude line number 1: hi line number 2: there line number 3: dude
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!