English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutorial básico PHP

Tutorial avançado PHP

PHP & MySQL

Manual de Referência PHP

Uso e exemplo da função PHP is_executable()

PHP Filesystem Referência

A função is_executable() pode verificar se o arquivo especificado é executável. Se o arquivo for executável, esta função pode retornar true.

Sintaxe

bool is_executable ( string $filename )

Esta função pode determinar se o nome do arquivo é executável.

Exemplo online

<?php
   $file = "/PhpProject/setup.exe";
   if(is_executable($file)) {
      echo $file." é executável";
   } else {
      echo $file." não é executável";
   }
?>

Resultado de saída

/PhpProject/setup.exe é executável
PHP Filesystem Referência