PHP is_executable () function
Definisi dan Penggunaan
Apakah is_executable () fungsi memeriksa tertentu file executable.
Jika file executable, fungsi mengembalikan TRUE.
tatabahasa
is_executable(file)
参数 | 描述 |
---|---|
file | 必需。规定要检查的文件。 |
Tips dan Catatan
Catatan: Hasil fungsi ini cache.Gunakan clearstatcache () untuk menghapus cache.
Catatan: Mulai dari PHP versi 5.0, is_executable () fungsi dapat digunakan pada Windows.
contoh
<?php
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>
$file = "setup.exe";
if(is_executable($file))
{
echo ("$file is executable");
}
else
{
echo ("$file is not executable");
}
?>
Kode di atas akan menampilkan:
setup.exe is executable
Lengkapi manual PHP Filesystem Referensi