현재 var_dump에서 잘못된 결과가 표시됩니다. FTP 계정에서 루트 디렉토리에있는 폴더와 파일의 결과를 얻는 방법이 있습니까?CURL 및 PHP를 사용하여 FTP를 통해 원격 사이트의 루트 디렉토리에서 디렉토리 및 파일 목록 가져 오기
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "ftp://www.xxxx.co.uk");
curl_setopt($ch, CURLOPT_USERPWD, "[xxxx]:[xxxx]");
// grab URL and pass it to the browser
$result = curl_exec($ch);
var_dump($result);
// close cURL resource, and free up system resources
curl_close($ch);
?>
ftp_connect
는 그냥 CURL 오류를 수행하고 나에게주는 액세스 내가 통해 로그인 동일한 사용자 및 암호 및 URL을 사용했다는 사실에도 불구하고 (530)를 부정 사용하지 않는 브라우저. –