请输入您要查询的百科知识:

 

词条 ftp_exec
释义

ftp_exec

(PHP 4 >= 4.0.3)

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 />\";
echo nl2br($res);
} else {
echo 'could not execute ' . $command;
}
?>

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/4 1:31:56