簡體   English   中英

使用file_get_content函數連接ftp帳戶

[英]connect ftp account with file_get_content function

我有一個FTP帳戶。 我想使用file_get_contents連接到FTP。 這可能嗎? 如果沒有,我該怎么辦?

我想對類似於hotfile或Rapidshare的上傳腳本執行此操作。

file_get_contents('ftp://username:password@host.com/');

如果我從對@genesis答案的評論中了解到您想做什么,那么您需要做的是:

$file = file_get_contents("derpost:pass**@ftp1.freakshare.com/Freez%20Screen%20Vide‌​o%20Capture.lnk");

header('Content-Disposition: attachment; filename="image.jpg"'); // Change file name as appropriate
header('Content-Length: '.strlen($file));
header('Content-Type: image/jpeg'); // Change this MIME type as appropriate

echo $file;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM