Answer the question
In order to leave comments, you need to log in
Strange behavior of php functions ftp_nlist and ftp_rawlist. What could be the problem?
Greetings!
More than once I had to use the above voiced functions, while there were no problems. Both functions returned a list of files. But with the transition to a new hosting, the following problems appeared:
(The version of php used is 5.5.13 )
The ftp_nlist() function returns the name of the root directory anyway.
$contents = ftp_nlist($conn_id, ".");
var_dump($contents);
Array
(
[0] => 134.255.229.133_28000
)
$contents = ftp_nlist($conn_id, "134.255.229.133_28000");
$contents = ftp_rawlist($conn_id, "134.255.229.133_28000");
array(3) {
[0]=>
string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp"
[1]=>
string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html"
}
Array
(
[0] => 06-16-14 07:22PM
dir_name_1
[1] => 06-24-14 04:50PM
dir_name_2
[2] => 07-31-14 02:37PM
dir_name_3
[3] => 06-16-14 07:30PM
dir_name_4
[4] => 07-31-14 05:27PM
dir_name_5
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question