PHP 中的 ftp_systype() 函式


ftp_systype() 函式返回 FTP 伺服器的系統型別識別符號。

語法

ftp_systype(con);

引數

  • con − FTP 連線

返回

ftp_systype() 函式成功時返回系統型別,失敗時返回 FALSE。

示例

示例如下 −

<?php
   $ftp_server = "192.168.0.4";
   $ftp_user = "jacob";
   $ftp_pass = "tywg61gh";
   $conn = ftp_ssl_connect($ftp_server) or die("Could not connect to $ftp_server");
   $login = ftp_login($conn, $ftp_user, $ftp_pass);
   if ($t = ftp_systype($conn)){
      echo "System type = $t";
   } else {
      echo "Cannot get the type!";
   }
   ftp_close($ftp_conn);
?>

更新於: 2019-07-30

58 次瀏覽

開啟你的 職業生涯

完成課程獲得認證

開始
廣告
© . All rights reserved.