欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php is_executable判斷給定文件名是否可執(zhí)行實(shí)例

 更新時(shí)間:2016年09月26日 08:41:00   投稿:lqh  
這篇文章主要介紹了php is_executable判斷給定文件名是否可執(zhí)行實(shí)例的相關(guān)資料,需要的朋友可以參考下

php is_executable函數(shù)用于判斷某一文件是否可以執(zhí)行,如果文件存在且可執(zhí)行則返回 TRUE ,錯(cuò)誤時(shí)返回 FALSE, 本文章向大家介紹is_executable函數(shù)的基本語(yǔ)法和使用實(shí)例。

 php is_executable函數(shù)介紹

is_executable函數(shù)用于判斷給定文件名是否可執(zhí)行

語(yǔ)法:

bool is_executable  ( string $filename  )

判斷給定文件名是否可執(zhí)行。

參數(shù):

filename  文件的路徑。

返回值:

如果文件存在且可執(zhí)行則返回 TRUE ,錯(cuò)誤時(shí)返回 FALSE 。 

php is_executable函數(shù)實(shí)例

使用is_executable判斷permissions.php文件是否可以執(zhí)行,代碼如下:

<?php
$file_name="permissions.php";

//Only works on Windows with PHP 5.0.0 or later
if(is_executable($file_name)) {
  echo ("The file $file_name is executable.<br />");
}
else {
  echo ("The file $file_name is not executable.<br />");
}
?>





以上就是對(duì)php is_executable判斷給定文件名是否可執(zhí)行的資料整理,后續(xù)繼續(xù)補(bǔ)充相關(guān)資料,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論