ftp类(example.php)

2016-02-19 12:09 4 1 收藏

想要天天向上,就要懂得享受学习。图老师为大家推荐ftp类(example.php),精彩的内容需要你们用心的阅读。还在等什么快点来看看吧!

【 tulaoshi.com - Web开发 】


flush();

$ftp_ini_datei         = $argv[1];

require ('./ftp_class.php');
require ($ftp_ini_datei);

echo "nCronjob started : ";
echo date("d.m.Y  - H:i:s");
echo "n";

$newftp         = new myftp;

if(!$anonymous){
    $result     = $newftp-connect($host, $user, $password);
}else{
    $result        = $newftp-connect($host, "anonymous", "mymail@somewhere.com");
}

if (!$result){
    $mydir         = $newftp-changedir($remote_dir);
    $mydir        = $newftp-getdir();
    $merkold_dir    = getcwd();
    chdir($local_dir);
    $mylist     = Array();
    $mylist     = $newftp-get_file_list($mydir);



    for ($i=0; $i sizeof($mylist); $i++)
    {
        $result = $newftp-get_file($mylist[$i], $mymode, $delete);
    }

    $result     = $newftp-ftp_bye();

}else{

    echo "----------------------------------n";
    echo "no connection established :(      n";
    echo "----------------------------------n";

}

echo "nnCronjob stopped : ";
echo date("d.m.Y - H:i:s");
echo "n";
?

来源:https://www.tulaoshi.com/n/20160219/1600037.html

延伸阅读
标签: PHP
  原来写的IPwhois类  <?php /* * * Class : IP Whois Verson 1.0 * Info : Get IP's information form 4 whois server * Author : PhpUp Studio * Date : 12/12/2004 * www.knowsky.com * */ class IPWhois {         var $server = 'whois.arin.net';      &nbs...
标签: Web开发
?php//// +----------------------------------------------------------------------+// | 分页类  |// +----------------------------------------------------------------------+// | Copyright (c) 2001 NetFish Software |//...
标签: Web开发
?php//// +----------------------------------------------------------------------+// | WHXBB 基类 |// +----------------------------------------------------------------------+// | Copyright (c) 2001 NetFish Software |// | ...
标签: Web开发
PHP 中的类在阐述类的概念之前我们来先说说面向对象编程的概念:面向对象的程序设计(Object-Oriented Programming,简记为OOP)立意于创建软件重用代码,具备更好地模拟现实世界环境的能力,这使它被公认为是自上而下编程的优胜者。它通过给程序中加入扩展语句,把函数“封装”进编程所必需的“对象”中。面向对象的编程语言使得复杂的工作条...
'This example uses the AddNew method to create a new record with the specified 'name. The AddName function is required for this procedure to run. Sub AddNewX() Dim dbsNorthwind As Database Dim rstEmployees As Recordset Dim strFirstName As String Dim strLastName As String Set dbsNorthwind = OpenDatabase("Northw...

经验教程

260

收藏

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