web方式ftp

2016-01-29 14:43 20 1 收藏

web方式ftp,web方式ftp

【 tulaoshi.com - PHP 】

  <?php

/* $Id: ftp.php,v 2.2 2002/03/12 23:21:28 pauls Exp $ */

/* This software came from http://inebria.com/ */

/* Copyright (c) 2000
      Paul Southworth.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote
    products derived from this software without specific prior
    written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */

/* Configuration Options */

$phpftp_host="localhost";
$phpftp_version="2.2";

/* Comment this out if you don't want the version footer */

$show_version_footer=1;

/* How large a file will you accept?  You may also need to edit your
   php.ini file and change upload_max_filesize appropriately */

$max_file_size="1000000";

/* The temporary directory $phpftp_tmpdir must exist and be writable
   by your web server.
   Hint:  mkdir /var/tmp/xfers && chmod 1777 /var/tmp/xfers */

$phpftp_tmpdir="/var/tmp/xfers";

/* $use_mime_lookup
   Turning this on creates a dependency upon the
   http://www.inebria.com/mime_lookup/ MIME type lookup library.
   Setting this variable to "1" enables it.  "0" disables.
   If you turn it on, put the mime_lookup.php file in the same directory
   as ftp.php and uncomment the 'include("mime_lookup.php");' statement. */

$use_mime_lookup="0";
/* include("mime_lookup.php"); */

/* We enclose the top and bottom in functions because sometimes
   we might not send them (ie, in a file-download situation) */

function phpftp_top() {
    global $phpftp_version;
?
<!-- function phpftp_top --
<html
<head
<titlePHP FTP Client <?php echo $phpftp_version; ?</title
</head
<body bgcolor="#ffffff"
<?php
}

function phpftp_bottom() {
    global $phpftp_version;
    global $show_version_footer;
?
<!-- function phpftp_bottom --
<?php
if (isset($show_version_footer)) {
?
<p<font size=-2This is <a href="http://inebria.com/phpftp/"PHP FTP</a
version <?php echo $phpftp_version; ?</font</p
<?php
}
?
</body
</html
<?php
}

/* This is the form used for initially collecting username/passwd

来源:https://www.tulaoshi.com/n/20160129/1494026.html

延伸阅读
标签: Web开发
昨天一个朋友有个需求,是要通过WEB方式,修改IIS服务器上的时间,由于他的系统是ASP 3.0下开发的,所以本例子的代码是ASP的,不是ASP.NET,但是本人写这个文章是想抛砖引玉,毕竟编写程序关键的不是语言,更重要的是一种思想,把程序语言理解为一种工具,把编程思想理解为解决问题的思路和方法,那么编写出来的程序就是:利用“工具”按照...
标签: 软件教程
FlashFXP是一款做编辑的孩子们必备一款软件,相信很多同行们都是使用的这款软件,这年头密码是何其多相信大家是知道的,那么我们怎么查看在FlashFXP站点的FTP密码呢?下面小编为大家介绍一下 1、点击菜单栏【属性】>【参数选择】,或者按快捷键F6。 2、在参数选择界面,点击左侧的【选项】,然后勾选右侧下方...
标签: PHP
现在,我们已经接触了PHP关于FTP的大量函数,但这仅仅只是函数,离我们的目标还远远不够,要显示出这些函数的真正力量,我们应该建立一个程序,这个程序能以WEB方式上传,下载文件---这就是我们将要做的! 在我们进入代码前,我想要告诉大家的是,这个例子仅仅只是为了向大家解释PHP的各种FTP函数的使用,很多方面还不够完善,...
win7创建ftp   同事需要,做了个演示顺便写了下来 1、建一个用户 计算机 右键点击管理添加一个用户test 2、打开iis,如果iis没有安装控制面板程序和功能--打开或关闭window功能 找到iis将ftp功能勾选 安装 物理路径:c:ftpftp上传 3、 设置ftp用户及权限 物理路径是c:ftpftp上传 也就是...
标签: 服务器
FTP上传故障巧解决   网友提问: 我是一名企业员工,平时我们公司都是通过FTP这种方式来共享资源,员工将自己手头的资源通过上传帐号放到FTP服务器的存储空间中,而其他员工在使用该资源时直接下载即可。然而在最近本人却发现在上传时总是出现断开连接的问题,一个300多M的视频文件传输过程中要中断几十次,而且在FTP通讯时反复...

经验教程

503

收藏

90
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部