PHP ftp_nlist () function

"Marble platform maintenance" marble platform after repairs need how to deal with?

 

Definition and Usage

List of files ftp_nlist () function returns the specified directory on the FTP server.

If successful, an array of file names in the specified directory consisting of returns. If it fails, FALSE is returned.

grammar

ftp_nlist(ftp_connection,dir)

 

参数 描述
ftp_connection 必需。规定要使用的 FTP 连接。
dir 必需。规定要检查的目录。请使用 "." 来获得当前目录。

 


Tips and Notes

Note: This function is not available for IIS (Internet Information Server). It returns nothing.


Examples

<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

print_r(ftp_nlist($conn,"images"));

ftp_close($conn);
?>

  

The above will output:

array(3)
{
[0]=> "flower.gif"
[1]=> "car.gif"
[2]=> "house.gif"
}

  

 

Guess you like

Origin www.cnblogs.com/furuihua/p/11698015.html