PHP ftp_rawlist() Function
Complete PHP FTP Reference
Definition and Usage
The ftp_rawlist() function returns a detailed list of files in the specified directory of the FTP server.
Syntax
|
ftp_rawlist(ftp_connection,dir,recursive)
|
| Parameter |
Description |
| ftp_connection |
Required. Specifies the FTP connection to use |
| dir |
Required. Specifies the directory. Use "." to specify the
current directory |
| recursive |
Optional. By default, this function sends a "LIST" command
to the server. However, if the recursive parameter is set to TRUE, it sends
a "LIST -R" command. |
Tips and Notes
Note: This function returns the server response as an array.
No parsing is performed.
Example
<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
print_r (ftp_rawlist($conn,"."));
ftp_close($conn);
?>
|
The output of the code above could be something like this:
Array
(
[0] => dr--r--r-- 1 user group 0 Feb 15 13:02 .
[1] => dr--r--r-- 1 user group 0 Feb 15 13:02 ..
[2] => drw-rw-rw- 1 user group 0 Jan 03 08:33 images
[3] => -rw-rw-rw- 1 user group 160 Feb 16 13:54 test.php
[4] => -rw-rw-rw- 1 user group 20 Feb 14 12:22 test.txt
)
|
Complete PHP FTP Reference

Whether you're new to XML or already an advanced user,
the user-friendly views and powerful entry helpers,
wizards, and debuggers in XMLSpy are designed to meet your XML
and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- And much more!
Download a free trial today!
|
|
|
|