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

ftp_put

(PHP 3 >= 3.0.13, PHP 4, PHP 5)

ftp_put -- 上传文件到 FTP 服务器

说明

bool ftp_put ( resource ftp_stream, string remote_file, string local_file, int mode [, int startpos] )

ftp_put() 函数用来上传由 local_file 参数指定的文件到 FTP 服务器,上传后的位置由 remote_file 指定。传输模式参数 mode 只能为 FTP_ASCII(文本模式)或 FTP_BINARY(二进制模式)。

注: 参数 startpos 仅适用于 PHP 4.3.0 以上版本。

如果成功则返回 TRUE,失败则返回 FALSE

例子 1. ftp_put() 实例

<?php
$upload
= ftp_put($conn_id, $destination_file, $source_file, FTP_ASCII);
?>

参见 ftp_fput()ftp_nb_fput()ftp_nb_put()




<ftp_pasvftp_pwd>
 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