请输入您要查询的百科知识:

 

词条 ftp_nlist
释义

ftp_nlist

(PHP 3>= 3.0.13, PHP 4 )

ftp_nlist -- 返回给定目录的文件列表

说明

array ftp_nlist ( resource ftp_stream, string directory)

如果成功则返回给定目录下的文件名组成的数组,否则返回 FALSE

例子 1. ftp_nlist()例子
<?php
// set up basic connection
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// check connection
if ((!$conn_id) || (!$login_result)) {
die("FTP connection has failed !");
}
// get contents of the root directory
$contents = ftp_nlist($conn_id, "/");
// print each entry
foreach ($contents as $entry) {
echo $entry, "<br />\";
}
?>

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/20 19:47:13