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

· 2017-02-13 (월) 01:11:23 · 2937

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);

 

?>

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

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
PHP 17-02-24 조회 3,645
PHP 17-02-24 조회 3,113
jQuery 17-02-23 조회 2,604
jQuery 17-02-23 조회 2,883
jQuery 17-02-23 조회 2,624
jQuery 17-02-22 조회 2,440
PHP 17-02-21 조회 2,680
PHP 17-02-21 조회 2,625
PHP 17-02-21 조회 4,417
PHP 17-02-20 조회 3,629
PHP 17-02-20 조회 3,018
PHP 17-02-20 조회 3,023
PHP 17-02-19 조회 2,841
PHP 17-02-19 조회 2,678
PHP 17-02-19 조회 2,824
PHP 17-02-17 조회 2,559
PHP 17-02-17 조회 2,987
PHP 17-02-17 조회 2,626
jQuery 17-02-16 조회 3,372
jQuery 17-02-16 조회 3,422
jQuery 17-02-16 조회 2,431
jQuery 17-02-15 조회 3,058
jQuery 17-02-15 조회 3,348
jQuery 17-02-15 조회 3,687
PHP 17-02-14 조회 2,882
PHP 17-02-14 조회 4,433
PHP 17-02-14 조회 2,672
PHP 17-02-13 조회 3,187
PHP 17-02-13 조회 2,598
PHP 17-02-13 조회 2,938