首页
开发手册
应用中心
工具
用户中心
FoundPHP FTP Upload and Download
English
中文简体
English
上一篇
下一篇
#FoundPHP FTP Upload and Download ###FTP File Upload and Download ```php //FTP Setting $FoundPHP_ftpset = array( 'host' => '127.0.0.1', //server 'port' => '21', //port 'username' => 'test', //account number 'password' => '123123', //password 'passive' => 1, //Passive mode: 1 to start, 0 to close 'timeout' => '3', //timeout period 'language' => 'cn', //language pack 'logs' => 'ftp_log.txt', //log ); //introduce class library $ftp = load('class/network/ftp','FoundPHP_ftp',$FoundPHP_ftpset); //upload files $ftp->put('a1.jpg','113.jpg'); //a1.jpg is the local file of the project //113.jpg is the file name after uploading to ftp //download file $ftp->get('113.jpg','a12.jpg'); //113.jpg is a ftp file //a12.jpg is the downloaded file name //close link $ftp->close(); ```