Complete PHP FTP Reference
The ftp_nlist() function lists the files in a specified directory on the FTP server.
This function returns an array of file names on success or FALSE on failure.
| Parameter | Description |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to use |
| dir | Required. Specifies the directory to check. Use "." to get the current directory |
Note: This function does not work with IIS (Internet Information Server). It returns nothing.
The output of the code above could be:
Complete PHP FTP Reference
Your message has been sent to W3Schools.