😕
I need to search to see if a directory is inside another directory.
This is the code I am currently using:
$host="ftp.host.com";
$user="user";
$pass="password";
$dir="usr/dir/";
$conn_id = ftp_connect($host);
// login with username and password
$login_result = ftp_login($conn_id, $user, $pass);
$username_array = array(ftp_nlist($conn_id, $dir));
$search = "hello";
if (array_key_exists(username, $username_array)) {
}
when I type that in it just says that the directory isn't in the directory I said for it to search in even if it is.
I know that was confusing but it is the best I could do
😕