Download files from ftp server in PHP

前端 未结 3 1047
北海茫月
北海茫月 2020-12-21 06:52

I am using the following format in php code to download files from ftp server.

file_put_contents(
            $filePath.$fileName, file_get_contents(
                


        
3条回答
  •  Happy的楠姐
    2020-12-21 07:23

    true == (
    $data = @
        file_get_contents('ftp://username:password@server_name/folder_name/xyz#123.csv')
        )
            ?
        file_put_contents('xyz#123.csv', $data)
            :
        exit;
    

提交回复
热议问题