PharFileInfo::chmod() - PharFileInfo类
PharFileInfo::chmod()
(PHP 5 >= 5.3.0, PHP 7, PECL phar >= 1.0.0)
Sets file-specific permission bits
说明
publicPharFileInfo::chmod(int $permissions): voidPharFileInfo::chmod() allows setting of the executable file permissions bit, as well as read-only bits. Writeable bits are ignored, and set at runtime based on the phar.readonly INI variable. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off in order to succeed if the file is within a Phar archive. Files within PharData archives do not have this restriction.
参数
$permissionspermissions(see chmod())
返回值
没有返回值。
范例
A PharFileInfo::chmod() example
'; // set executable bit $p['file.sh']->chmod(0555); var_dump($p['file.sh']->isExecutable()); } catch (Exception $e) { echo 'Could not create/modify phar: ', $e; } ?>
以上例程会输出:
bool(true)
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!