FTP源代码

发布于 2024-09-27 21:05:34 字数 1539 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

日裸衫吸 2024-10-04 21:05:34

http://archive.ubuntu.com/ubuntu/pool/main/n/netkit-ftp/netkit-ftp_0.17.orig.tar.gz

If it's specifically Ubuntu source code that you are interested in, it's easy. Go to a package description page such as http://packages.ubuntu.com/lucid/net/ , follow the relevant links, and look for a link to a .orig.tar.gz file in the package description. Ubuntu packages all work this way.

笑看君怀她人 2024-10-04 21:05:34

源代码链接位于 http://packages.ubuntu.com/ 上的软件包页面顶部

Source code links are at the top of package pages on http://packages.ubuntu.com/

束缚m 2024-10-04 21:05:34

这是代码

<?php
$ftp_server = “www.yoursite.com”;
$ftp_user_name = “username”;
$ftp_user_pass = “password”;
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ((!$conn_id) || (!$login_result)) {
echo “FTP connection has failed!”;
echo “Attempted to connect to $ftp_server for user $ftp_user_name”;
exit;
} else {
echo “Connected to $ftp_server, for user $ftp_user_name”;
}
$dir = “”;

function filecollect($dir,$filelist) {
global $conn_id; //Get our ftp
$files = ftp_nlist($conn_id,$dir); //get files in directory
foreach ($files as $file) {
//$isfile = ftp_size($conn_id, $file);
if($isfile == “-1″) { //Is a file or directory?
$filelist = filecollect($dir.’/’.$file,$filelist,$num); //If a folder, do a filecollect on it
}
else {
$filelist[(count($filelist)+1)] = $file; //If not, add it as a file to the file list
}
}
return $filelist;
}

$filelist = filecollect($dir,$filelist);

echo “<pre>”;
print_r($filelist);
echo “</pre>”;

$dir=”yoursite.com”;
$filelist = filecollect($dir,$filelist);

echo “<pre>”;
print_r($filelist);
echo “</pre>”;
$new=explode(“/”,$filelist['73']);
$myFile =$new[1];
//echo “$myFile”;
$fh = fopen($myFile, ‘r’) or die(“can’t open file”);
//$fh = fopen($myFile, ‘w’) or die(“can’t open file”);
//$stringData = “Ashwani\n”;
//fwrite($fh, $stringData);

$the = fread($fh, 1000000);
fclose($fh);

?>
<form action=”" method=”post” enctype=”multipart/form-data” name=”form”><table width=”100%” border=”0″>
<tr>
<td><? echo $new[1];  ?></td>
<td><textarea name=”textarea” cols=”40″ rows=”40″><? echo $the; ?></textarea></td>
</tr>
</table>
</form>

here are the code

<?php
$ftp_server = “www.yoursite.com”;
$ftp_user_name = “username”;
$ftp_user_pass = “password”;
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ((!$conn_id) || (!$login_result)) {
echo “FTP connection has failed!”;
echo “Attempted to connect to $ftp_server for user $ftp_user_name”;
exit;
} else {
echo “Connected to $ftp_server, for user $ftp_user_name”;
}
$dir = “”;

function filecollect($dir,$filelist) {
global $conn_id; //Get our ftp
$files = ftp_nlist($conn_id,$dir); //get files in directory
foreach ($files as $file) {
//$isfile = ftp_size($conn_id, $file);
if($isfile == “-1″) { //Is a file or directory?
$filelist = filecollect($dir.’/’.$file,$filelist,$num); //If a folder, do a filecollect on it
}
else {
$filelist[(count($filelist)+1)] = $file; //If not, add it as a file to the file list
}
}
return $filelist;
}

$filelist = filecollect($dir,$filelist);

echo “<pre>”;
print_r($filelist);
echo “</pre>”;

$dir=”yoursite.com”;
$filelist = filecollect($dir,$filelist);

echo “<pre>”;
print_r($filelist);
echo “</pre>”;
$new=explode(“/”,$filelist['73']);
$myFile =$new[1];
//echo “$myFile”;
$fh = fopen($myFile, ‘r’) or die(“can’t open file”);
//$fh = fopen($myFile, ‘w’) or die(“can’t open file”);
//$stringData = “Ashwani\n”;
//fwrite($fh, $stringData);

$the = fread($fh, 1000000);
fclose($fh);

?>
<form action=”" method=”post” enctype=”multipart/form-data” name=”form”><table width=”100%” border=”0″>
<tr>
<td><? echo $new[1];  ?></td>
<td><textarea name=”textarea” cols=”40″ rows=”40″><? echo $the; ?></textarea></td>
</tr>
</table>
</form>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文