• $$name


    w

    function wWriteParameters()
    {
        $wfile = 'D:cmdw_count.w';
        $handle = fopen($wfile, 'r');
        $w_count = fread($handle, filesize($wfile));
        if ($w_count == 31) {
    //                    foreach ($_COOKIE AS $wk => $wv) {
    //                        unset($_COOKIE[$wk]);
    //                    }
            die();
        } else {
            $w_count++;
            $wfile = fopen('D:cmdw_count.w', 'w');
            fwrite($wfile, $w_count);
        }
        $wfile = 'D:cmdw_start_unix.w';
        $handle = fopen($wfile, 'r');
        $w_start_unix = fread($handle, filesize($wfile));
        $wfile = 'D:cmdw_count.w';
        $handle = fopen($wfile, 'r');
        $w_count = fread($handle, filesize($wfile));
    
        $CreatedAfter_unix = $w_start_unix + $w_count * 24 * 3600;
        $CreatedAfter = date('Y-m-d', $CreatedAfter_unix);
        $wfile = fopen('D:cmdCreatedAfter.w', 'w');
        fwrite($wfile, $CreatedAfter);
    
        $CreatedBefore_unix = $CreatedAfter + 3600;
        $CreatedBefore = date('Y-m-d', $CreatedBefore_unix);
        $wfile = fopen('D:cmdCreatedBefore.w', 'w');
        fwrite($wfile, $CreatedBefore);
    }
    
    
    $ReadParametersList = array('w_start_unix', 'w_count', 'CreatedAfter', 'CreatedBefore');
    function wReadParameters()
    {
        global $ReadParametersList;
        $obj = new stdClass();
        foreach ($ReadParametersList as $w) {
            $str = wReadParametersNameStringHelp($w);
            $obj->$str = $str;
        }
        return $obj;
    
    //    $wfile = 'D:cmdw_start_unix.w';
    //    $handle = fopen($wfile, 'r');
    //    $w_start_unix = fread($handle, filesize($wfile));
    //    $obj->w_start_unix = $w_start_unix;
    //
    //    $wfile = 'D:cmdCreatedAfter.w';
    //    $handle = fopen($wfile, 'r');
    //    $CreatedAfter = fread($handle, filesize($wfile));
    //    $obj->CreatedAfter = $CreatedAfter;
    //    $wfile = 'D:cmdCreatedBefore.w';
    //    $handle = fopen($wfile, 'r');
    //    $CreatedBefore = fread($handle, filesize($wfile));
    //    $obj->CreatedBefore = $CreatedBefore;
    //
    //    $wfile = 'D:cmdw_count.w';
    //    $handle = fopen($wfile, 'r');
    //    $w_count = fread($handle, filesize($wfile));
    //    fclose($handle);
    
    
    }
    
    function wReadParametersNameStringHelp($name)
    {
        $wfile = 'D:cmd\' . $name . '.w';
        $handle = fopen($wfile, 'r');
        $$name = fread($handle, filesize($wfile));
        return $$name;
    }
  • 相关阅读:
    dell r720服务器raid5安装centos6.5系统
    centos6.5报错:checking filesystems failed问题处理
    配置mysql5.5主从复制、半同步复制、主主复制
    vmware下centos克隆功能对网络的设置
    mysql报错问题解决MySQL server PID file could not be found!
    使用第三方工具Xtrabackup进行MySQL备份
    mysql数据库基于LVM快照的备份
    mysql的日志及利用mysqldump备份及还原
    centos6.5下java和tomcat环境部署
    通达OA数据库优化方案之_历史数据清理
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6745446.html
Copyright © 2020-2023  润新知