ftp_systype

(PHP 4, PHP 5, PHP 7, PHP 8)

ftp_systype返回遠程 FTP 服務(wù)器的操作系統(tǒng)類型

說明

ftp_systype(resource $ftp_stream): string

返回遠程 FTP 服務(wù)器的操作系統(tǒng)類型。

參數(shù)

ftp_stream

FTP 連接資源。

返回值

返回遠程服務(wù)器類型,發(fā)生錯誤則返回 false

范例

示例 #1 ftp_systype() 示例

<?php
// 建立 ftp 連接
$ftp ftp_connect('ftp.example.com');
ftp_login($ftp'user''password');

// 獲取操作系統(tǒng)類型
if ($type ftp_systype($ftp)) {
    echo 
"Example.com 的操作系統(tǒng)為 $type\n";
} else {
    echo 
"無法獲取操作系統(tǒng)類型";
}
?>

以上例程的輸出類似于:

Example.com 的操作系統(tǒng)為 UNIX