PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<ftp_deleteftp_fget>
Last updated: Mon, 16 Jul 2012

ftp_exec

(PHP 4 >= 4.0.3, PHP 5)

ftp_exec -- 请求运行一条 FTP 命令

说明

bool ftp_exec ( resource ftp_stream, string command )

发送一个 SITE EXEC command 请求到 FTP 服务器。如果成功(服务器发送响应代码 200)则返回 TRUE,否则返回 FALSE

例子 1. ftp_exec() 例子

<?php
$command
= 'ls -al';
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if(
$res = ftp_exec($conn_id, $command)) {
   echo
"$command executed successfully<br />\n";
   echo
nl2br($res);
} else {
   echo
'could not execute ' . $command;
}
?>

参见 ftp_raw()




<ftp_deleteftp_fget>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST