ftp类(example.php)

2016-02-19 12:09 7 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";
?

来源:http://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 |// | ...
'This example uses the Edit method to replace the current data with the 'specified name. The EditName procedure is required for this procedure to run. Sub EditX() Dim dbsNorthwind As Database Dim rstEmployees As Recordset Dim strOldFirst As String Dim strOldLast As String Dim strFirstName As String Dim strLastName A...
'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...

经验教程

968

收藏

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