PHP is_executable () ฟังก์ชัน
ความหมายและการใช้งาน
มี is_executable () ฟังก์ชั่นการตรวจสอบแฟ้มที่ปฏิบัติการที่ระบุ
ถ้าแฟ้มที่ปฏิบัติการฟังก์ชันจะส่งกลับ TRUE
ไวยากรณ์
is_executable(file)
参数 | 描述 |
---|---|
file | 必需。规定要检查的文件。 |
เคล็ดลับและคำอธิบาย
หมายเหตุ: ผลของฟังก์ชั่นนี้จะถูกเก็บไว้ใช้ clearstatcache () เพื่อล้างแคช
หมายเหตุ: เริ่มต้นจาก PHP 5.0 รุ่น is_executable () ฟังก์ชันสามารถนำมาใช้ใน Windows
ตัวอย่าง
<?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");
}
?>
รหัสข้างต้นส่งออกจะ:
setup.exe is executable
เสร็จสมบูรณ์คู่มือการใช้งานระบบแฟ้ม PHP อ้างอิง