array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'splfileinfo.isexecutable.php', 1 => 'SplFileInfo::isExecutable', 2 => 'Tells if the file is executable', ), 'up' => array ( 0 => 'class.splfileinfo.php', 1 => 'SplFileInfo', ), 'prev' => array ( 0 => 'splfileinfo.isdir.php', 1 => 'SplFileInfo::isDir', ), 'next' => array ( 0 => 'splfileinfo.isfile.php', 1 => 'SplFileInfo::isFile', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splfileinfo/isexecutable.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::isExecutable — Tells if the file is executable
此函数没有参数。
示例 #1 SplFileInfo::isExecutable() example
<?php
$info = new SplFileInfo('/usr/bin/php');
var_dump($info->isExecutable());
$info = new SplFileInfo('/usr/bin');
var_dump($info->isExecutable());
$info = new SplFileInfo('foo');
var_dump($info->isExecutable());
?>
以上示例的输出类似于:
bool(true) bool(true) bool(false)