FTP 函数
PHP 手册

ftp_systype

(PHP 4, PHP 5)

ftp_systype返回远程 FTP 服务器的操作系统类型

说明

string ftp_systype ( resource $ftp_stream )

返回远程服务器的系统类型,发生错误则返回 FALSE

参数

ftp_stream

FTP 连接资源。

返回值

返回远程服务器类型,失败返回 FALSE

范例

Example #1 ftp_systype() 例子

<?php
// ftp connection
$ftp ftp_connect('ftp.example.com');
ftp_login($ftp'user''password');

// get the system type
if ($type ftp_systype($ftp)) {
    echo 
"Example.com is powered by $type\n";
} else {
    echo 
"Couldn't get the systype";
}
?>

上例的输出类似于:

Example.com is powerd by UNIX


FTP 函数
PHP 手册