테스트 사이트 - 개발 중인 베타 버전입니다

ftp_exec - FTP 서버에서 명령 실행을 요청합니다.

ftp_exec - FTP 서버에서 명령 실행을 요청합니다.

 

설명 ¶

 

bool ftp_exec ( resource $ftp_stream , string $command )

commandFTP 서버 에 SITE EXEC 요청을 보냅니다 .

 

매개 변수 ¶

 

ftp_stream

FTP 연결의 링크 식별자입니다.

 

command

실행할 명령.

 

반환 값 ¶

 

TRUE명령이 성공하면 반환 합니다 (서버가 보낸 응답 코드 : 200 ). 그렇지 않으면를 반환합니다 FALSE.

 

예 ¶

 

Example # 1 ftp_exec () 예제

 

<?php

 

// variable initialization

$command = 'ls -al >files.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);

 

// execute command

if (ftp_exec($conn_id, $command)) {

    echo "$command executed successfully\n";

} else {

    echo "could not execute $command\n";

}

 

// close the connection

ftp_close($conn_id);

 

?>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
18200
18195
18193
18181
18179
18173
18170
18164
18158
18155
18152
18151
18150
18140
18139
18138
18131
18130
18120
18119
18118
18117
18116
18111
18110
18108
18107
18106
18100
18090