The is_link() 函數檢查指定的檔案是否為連線。
如果檔案是連接,則函數傳回TRUE。
is_link(file)
參數 | 描述 |
---|---|
file | 必需。規定要檢查的文件。 |
註:該函數的結果會被緩存。請使用clearstatcache() 來清除快取。
<?php$link = "images";if(is_link($link)) { echo ("$link is a link"); }else { echo ("$link is not a link"); }?>
上面的程式碼將輸出:
images is not a link