ftp_pasv - 수동 모드를 켜거나 끕니다.
ftp_pasv - 수동 모드를 켜거나 끕니다.
설명 ¶
bool ftp_pasv ( resource $ftp_stream , bool $pasv )
ftp_pasv () 는 수동 모드를 켜거나 끕니다. 패시브 모드에서 데이터 연결은 서버가 아닌 클라이언트에 의해 시작됩니다. 클라이언트가 방화벽 뒤에있는 경우 필요할 수 있습니다.
그주의하시기 바랍니다 ftp_pasv () 만 성공적으로 로그인 한 후 호출 할 수 있습니다 또는 그렇지 않으면 실패합니다.
매개 변수 ¶
ftp_stream
FTP 연결의 링크 식별자입니다.
pasv
경우 TRUE수동 모드가 설정되어, 그렇지 않으면이 꺼져 있어요.
반환 값 ¶
반환 값 TRUE성공 또는 FALSE실패.
예 ¶
Example # 1 ftp_pasv () 예제
<?php
$file = 'somefile.txt';
$remote_file = 'readme.txt';
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// turn passive mode on
ftp_pasv($conn_id, true);
// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
// close the connection
ftp_close($conn_id);
?>
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4526 | PHP | 8년 전 | 1963 | ||
| 4525 | PHP | 8년 전 | 1814 | ||
| 4524 | PHP | 8년 전 | 1981 | ||
| 4523 | 기타 |
프로그래머7
|
8년 전 | 14778 | |
| 4522 | OS |
프로그래머7
|
8년 전 | 3035 | |
| 4521 | jQuery |
프로그래머7
|
8년 전 | 2114 | |
| 4520 | jQuery |
프로그래머7
|
8년 전 | 2214 | |
| 4519 | jQuery |
프로그래머7
|
8년 전 | 2324 | |
| 4518 | jQuery |
프로그래머7
|
8년 전 | 2086 | |
| 4517 | jQuery |
프로그래머7
|
8년 전 | 2238 | |
| 4516 | jQuery |
프로그래머7
|
8년 전 | 3191 | |
| 4515 | PHP | 8년 전 | 2102 | ||
| 4514 | PHP | 8년 전 | 1879 | ||
| 4513 | PHP | 8년 전 | 2173 | ||
| 4512 | PHP | 8년 전 | 1932 | ||
| 4511 | PHP | 8년 전 | 2659 | ||
| 4510 | PHP | 8년 전 | 2353 | ||
| 4509 | jQuery |
프로그래머7
|
8년 전 | 2241 | |
| 4508 | jQuery |
프로그래머7
|
8년 전 | 2372 | |
| 4507 | jQuery |
프로그래머7
|
8년 전 | 1745 | |
| 4506 | jQuery |
프로그래머7
|
8년 전 | 1780 | |
| 4505 | jQuery |
프로그래머7
|
8년 전 | 1791 | |
| 4504 | jQuery |
프로그래머7
|
8년 전 | 2167 | |
| 4503 | PHP | 8년 전 | 2292 | ||
| 4502 | PHP | 8년 전 | 2156 | ||
| 4501 | PHP | 8년 전 | 2413 | ||
| 4500 | jQuery |
프로그래머7
|
8년 전 | 1835 | |
| 4499 | jQuery |
프로그래머7
|
8년 전 | 1775 | |
| 4498 | jQuery |
프로그래머7
|
8년 전 | 1659 | |
| 4497 | PHP | 8년 전 | 1659 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기