亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tar.php

?? php版wap手機網站源碼(英語) the best wap scripts from
?? PHP
?? 第 1 頁 / 共 4 頁
字號:
<?php
/* vim: set ts=4 sw=4: */
// +----------------------------------------------------------------------+
// | PHP Version 4                                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group                                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.php.net/license/3_0.txt.                                  |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | license@php.net so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Author: Vincent Blavet <vincent@blavet.net>                          |
// +----------------------------------------------------------------------+
//
// $Id: Tar.php,v 1.19 2004/05/08 09:56:26 vblavet Exp $

require_once 'PEAR.php';


define ('ARCHIVE_TAR_ATT_SEPARATOR', 90001);

/**
* Creates a (compressed) Tar archive
*
* @author   Vincent Blavet <vincent@blavet.net>
* @version  $Revision: 1.19 $
* @package  Archive
*/
class Archive_Tar extends PEAR
{
    /**
    * @var string Name of the Tar
    */
    var $_tarname='';

    /**
    * @var boolean if true, the Tar file will be gzipped
    */
    var $_compress=false;

    /**
    * @var string Type of compression : 'none', 'gz' or 'bz2'
    */
    var $_compress_type='none';

    /**
    * @var string Explode separator
    */
    var $_separator=' ';

    /**
    * @var file descriptor
    */
    var $_file=0;

    /**
    * @var string Local Tar name of a remote Tar (http:// or ftp://)
    */
    var $_temp_tarname='';

    // {{{ constructor
    /**
    * Archive_Tar Class constructor. This flavour of the constructor only
    * declare a new Archive_Tar object, identifying it by the name of the
    * tar file.
    * If the compress argument is set the tar will be read or created as a
    * gzip or bz2 compressed TAR file.
    *
    * @param    string  $p_tarname  The name of the tar archive to create
    * @param    string  $p_compress can be null, 'gz' or 'bz2'. This
    *                   parameter indicates if gzip or bz2 compression
    *                   is required.  For compatibility reason the
    *                   boolean value 'true' means 'gz'.
    * @access public
    */
    function Archive_Tar($p_tarname, $p_compress = null)
    {
        $this->PEAR();
        $this->_compress = false;
        $this->_compress_type = 'none';
        if ($p_compress === null) {
            if (@file_exists($p_tarname)) {
                if ($fp = @fopen($p_tarname, "rb")) {
                    // look for gzip magic cookie
                    $data = fread($fp, 2);
                    fclose($fp);
                    if ($data == "\37\213") {
                        $this->_compress = true;
                        $this->_compress_type = 'gz';
                    // No sure it's enought for a magic code ....
                    } elseif ($data == "BZ") {
                        $this->_compress = true;
                        $this->_compress_type = 'bz2';
                    }
                }
            } else {
                // probably a remote file or some file accessible
                // through a stream interface
                if (substr($p_tarname, -2) == 'gz') {
                    $this->_compress = true;
                    $this->_compress_type = 'gz';
                } elseif ((substr($p_tarname, -3) == 'bz2') ||
                          (substr($p_tarname, -2) == 'bz')) {
                    $this->_compress = true;
                    $this->_compress_type = 'bz2';
                }
            }
        } else {
            if (($p_compress === true) || ($p_compress == 'gz')) {
                $this->_compress = true;
                $this->_compress_type = 'gz';
            } else if ($p_compress == 'bz2') {
                $this->_compress = true;
                $this->_compress_type = 'bz2';
            }
        }
        $this->_tarname = $p_tarname;
        if ($this->_compress) { // assert zlib or bz2 extension support
            if ($this->_compress_type == 'gz')
                $extname = 'zlib';
            else if ($this->_compress_type == 'bz2')
                $extname = 'bz2';

            if (!extension_loaded($extname)) {
                PEAR::loadExtension($extname);
            }
            if (!extension_loaded($extname)) {
                die("The extension '$extname' couldn't be found.\n".
                    "Please make sure your version of PHP was built ".
                    "with '$extname' support.\n");
                return false;
            }
        }
    }
    // }}}

    // {{{ destructor
    function _Archive_Tar()
    {
        $this->_close();
        // ----- Look for a local copy to delete
        if ($this->_temp_tarname != '')
            @unlink($this->_temp_tarname);
        $this->_PEAR();
    }
    // }}}

    // {{{ create()
    /**
    * This method creates the archive file and add the files / directories
    * that are listed in $p_filelist.
    * If a file with the same name exist and is writable, it is replaced
    * by the new tar.
    * The method return false and a PEAR error text.
    * The $p_filelist parameter can be an array of string, each string
    * representing a filename or a directory name with their path if
    * needed. It can also be a single string with names separated by a
    * single blank.
    * For each directory added in the archive, the files and
    * sub-directories are also added.
    * See also createModify() method for more details.
    *
    * @param array  $p_filelist An array of filenames and directory names, or a single
    *                           string with names separated by a single blank space.
    * @return                   true on success, false on error.
    * @see createModify()
    * @access public
    */
    function create($p_filelist)
    {
        return $this->createModify($p_filelist, '', '');
    }
    // }}}

    // {{{ add()
    /**
    * This method add the files / directories that are listed in $p_filelist in
    * the archive. If the archive does not exist it is created.
    * The method return false and a PEAR error text.
    * The files and directories listed are only added at the end of the archive,
    * even if a file with the same name is already archived.
    * See also createModify() method for more details.
    *
    * @param array  $p_filelist An array of filenames and directory names, or a single
    *                           string with names separated by a single blank space.
    * @return                   true on success, false on error.
    * @see createModify()
    * @access public
    */
    function add($p_filelist)
    {
        return $this->addModify($p_filelist, '', '');
    }
    // }}}

    // {{{ extract()
    function extract($p_path='')
    {
        return $this->extractModify($p_path, '');
    }
    // }}}

    // {{{ listContent()
    function listContent()
    {
        $v_list_detail = array();

        if ($this->_openRead()) {
            if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
                unset($v_list_detail);
                $v_list_detail = 0;
            }
            $this->_close();
        }

        return $v_list_detail;
    }
    // }}}

    // {{{ createModify()
    /**
    * This method creates the archive file and add the files / directories
    * that are listed in $p_filelist.
    * If the file already exists and is writable, it is replaced by the
    * new tar. It is a create and not an add. If the file exists and is
    * read-only or is a directory it is not replaced. The method return
    * false and a PEAR error text.
    * The $p_filelist parameter can be an array of string, each string
    * representing a filename or a directory name with their path if
    * needed. It can also be a single string with names separated by a
    * single blank.
    * The path indicated in $p_remove_dir will be removed from the
    * memorized path of each file / directory listed when this path
    * exists. By default nothing is removed (empty path '')
    * The path indicated in $p_add_dir will be added at the beginning of
    * the memorized path of each file / directory listed. However it can
    * be set to empty ''. The adding of a path is done after the removing
    * of path.
    * The path add/remove ability enables the user to prepare an archive
    * for extraction in a different path than the origin files are.
    * See also addModify() method for file adding properties.
    *
    * @param array  $p_filelist     An array of filenames and directory names, or a single
    *                               string with names separated by a single blank space.
    * @param string $p_add_dir      A string which contains a path to be added to the
    *                               memorized path of each element in the list.
    * @param string $p_remove_dir   A string which contains a path to be removed from
    *                               the memorized path of each element in the list, when
    *                               relevant.
    * @return boolean               true on success, false on error.
    * @access public
    * @see addModify()
    */
    function createModify($p_filelist, $p_add_dir, $p_remove_dir='')
    {
        $v_result = true;

        if (!$this->_openWrite())
            return false;

        if ($p_filelist != '') {
            if (is_array($p_filelist))
                $v_list = $p_filelist;
            elseif (is_string($p_filelist))
                $v_list = explode($this->_separator, $p_filelist);
            else {
                $this->_cleanFile();
                $this->_error('Invalid file list');
                return false;
            }

            $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir);
        }

        if ($v_result) {
            $this->_writeFooter();
            $this->_close();
        } else
            $this->_cleanFile();

        return $v_result;
    }
    // }}}

    // {{{ addModify()
    /**
    * This method add the files / directories listed in $p_filelist at the
    * end of the existing archive. If the archive does not yet exists it
    * is created.
    * The $p_filelist parameter can be an array of string, each string
    * representing a filename or a directory name with their path if
    * needed. It can also be a single string with names separated by a
    * single blank.
    * The path indicated in $p_remove_dir will be removed from the
    * memorized path of each file / directory listed when this path
    * exists. By default nothing is removed (empty path '')
    * The path indicated in $p_add_dir will be added at the beginning of
    * the memorized path of each file / directory listed. However it can
    * be set to empty ''. The adding of a path is done after the removing
    * of path.
    * The path add/remove ability enables the user to prepare an archive
    * for extraction in a different path than the origin files are.
    * If a file/dir is already in the archive it will only be added at the
    * end of the archive. There is no update of the existing archived
    * file/dir. However while extracting the archive, the last file will
    * replace the first one. This results in a none optimization of the
    * archive size.
    * If a file/dir does not exist the file/dir is ignored. However an
    * error text is send to PEAR error.
    * If a file/dir is not readable the file/dir is ignored. However an
    * error text is send to PEAR error.
    *
    * @param array      $p_filelist     An array of filenames and directory names, or a single
    *                                   string with names separated by a single blank space.
    * @param string     $p_add_dir      A string which contains a path to be added to the
    *                                   memorized path of each element in the list.
    * @param string     $p_remove_dir   A string which contains a path to be removed from
    *                                   the memorized path of each element in the list, when
    *                                   relevant.
    * @return                           true on success, false on error.
    * @access public
    */
    function addModify($p_filelist, $p_add_dir, $p_remove_dir='')
    {
        $v_result = true;

        if (!@is_file($this->_tarname))
            $v_result = $this->createModify($p_filelist, $p_add_dir, $p_remove_dir);
        else {
            if (is_array($p_filelist))
                $v_list = $p_filelist;
            elseif (is_string($p_filelist))
                $v_list = explode($this->_separator, $p_filelist);
            else {
                $this->_error('Invalid file list');
                return false;
            }

            $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir);
        }

        return $v_result;
    }
    // }}}

    // {{{ addString()
    /**
    * This method add a single string as a file at the
    * end of the existing archive. If the archive does not yet exists it
    * is created.
    *
    * @param string     $p_filename     A string which contains the full filename path
    *                                   that will be associated with the string.
    * @param string     $p_string       The content of the file added in the archive.
    * @return                           true on success, false on error.
    * @access public
    */
    function addString($p_filename, $p_string)
    {
        $v_result = true;

        if (!@is_file($this->_tarname)) {
            if (!$this->_openWrite()) {
                return false;
            }
            $this->_close();
        }

        if (!$this->_openAppend())
            return false;

        // Need to check the get back to the temporary file ? ....
        $v_result = $this->_addString($p_filename, $p_string);

        $this->_writeFooter();

        $this->_close();

        return $v_result;
    }
    // }}}

    // {{{ extractModify()
    /**
    * This method extract all the content of the archive in the directory
    * indicated by $p_path. When relevant the memorized path of the
    * files/dir can be modified by removing the $p_remove_path path at the
    * beginning of the file/dir path.
    * While extracting a file, if the directory path does not exists it is
    * created.
    * While extracting a file, if the file already exists it is replaced
    * without looking for last modification date.
    * While extracting a file, if the file already exists and is write
    * protected, the extraction is aborted.
    * While extracting a file, if a directory with the same name already
    * exists, the extraction is aborted.
    * While extracting a directory, if a file with the same name already
    * exists, the extraction is aborted.
    * While extracting a file/directory if the destination directory exist
    * and is write protected, or does not exist but can not be created,
    * the extraction is aborted.
    * If after extraction an extracted file does not show the correct
    * stored file size, the extraction is aborted.
    * When the extraction is aborted, a PEAR error text is set and false
    * is returned. However the result can be a partial extraction that may
    * need to be manually cleaned.
    *
    * @param string $p_path         The path of the directory where the files/dir need to by
    *                               extracted.
    * @param string $p_remove_path  Part of the memorized path that can be removed if
    *                               present at the beginning of the file/dir path.
    * @return boolean               true on success, false on error.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图制服诱惑| 久久国产精品区| 久久亚洲综合色一区二区三区| av综合在线播放| 日本成人中文字幕在线视频| 国产精品乱人伦中文| 日韩欧美激情一区| 欧美性受极品xxxx喷水| 国产91精品一区二区麻豆网站| 午夜精品久久久久久久99水蜜桃 | 中文一区二区在线观看| 欧美精三区欧美精三区 | 日韩欧美色综合| 欧美主播一区二区三区| 本田岬高潮一区二区三区| 国产在线视视频有精品| 日韩精品亚洲一区| 亚洲777理论| 亚洲小说欧美激情另类| 亚洲视频小说图片| 国产精品美女久久久久高潮| 久久久亚洲午夜电影| 日韩欧美不卡一区| 欧美一级一区二区| 欧美精品日韩精品| 欧美日韩国产三级| 欧美日韩成人激情| 欧美日韩在线播放| 欧美日韩久久一区| 欧美午夜在线观看| 欧美羞羞免费网站| 欧美日韩一区不卡| 欧美精品第1页| 欧美放荡的少妇| 欧美亚一区二区| 欧美写真视频网站| 欧美日韩精品一区视频| 欧美夫妻性生活| 3d动漫精品啪啪1区2区免费 | 欧美亚洲动漫制服丝袜| 欧美最猛黑人xxxxx猛交| 91在线一区二区三区| 99re成人精品视频| 99riav一区二区三区| 91在线观看视频| 欧美午夜精品一区二区三区| 在线不卡一区二区| 精品久久国产97色综合| 久久蜜桃av一区二区天堂| 久久精品这里都是精品| 一色屋精品亚洲香蕉网站| ...xxx性欧美| 亚洲国产毛片aaaaa无费看 | 樱桃视频在线观看一区| 亚洲精品va在线观看| 视频一区二区欧美| 久久精品国产成人一区二区三区 | 97久久超碰国产精品电影| 91麻豆.com| 欧美三级韩国三级日本三斤| 91精品国产欧美日韩| 久久综合色之久久综合| 中文在线一区二区| 亚洲高清一区二区三区| 麻豆精品国产91久久久久久| 国产99久久久国产精品潘金 | 99久久精品国产导航| 欧美在线综合视频| 日韩欧美aaaaaa| 中文字幕中文字幕一区二区| 亚洲一区二区三区四区的| 麻豆91精品视频| eeuss鲁片一区二区三区在线看| 在线观看成人免费视频| 精品欧美一区二区久久| 亚洲人成亚洲人成在线观看图片| 日韩电影免费一区| 高清不卡在线观看av| 欧美在线三级电影| 久久这里只有精品6| 亚洲伦理在线精品| 久久成人免费网| 日本久久一区二区| 久久久久久久久久看片| 亚洲最大成人综合| 国产乱理伦片在线观看夜一区| 色婷婷一区二区三区四区| 精品对白一区国产伦| 亚洲成av人综合在线观看| 国产盗摄一区二区| 在线不卡一区二区| 亚洲人午夜精品天堂一二香蕉| 精彩视频一区二区三区| 91行情网站电视在线观看高清版| 精品国产乱码久久久久久老虎| 亚洲品质自拍视频网站| 国产高清在线精品| 91精品国产麻豆| 亚洲女同女同女同女同女同69| 精品一区二区影视| 欧美色涩在线第一页| 亚洲天堂中文字幕| 国产在线播精品第三| 欧美精品久久一区| 专区另类欧美日韩| 国产精品一卡二卡| 日韩一级高清毛片| 亚洲成av人片| 91美女精品福利| 欧美国产国产综合| 国产专区综合网| 精品少妇一区二区三区在线视频| 亚洲成av人片在线观看无码| 97久久人人超碰| 国产精品动漫网站| 国产成人高清视频| 久久久久亚洲综合| 毛片基地黄久久久久久天堂| 欧美精品欧美精品系列| 亚洲韩国精品一区| 欧美午夜精品久久久久久超碰| 国产精品灌醉下药二区| 国产成人免费高清| 久久婷婷色综合| 国产一区二区按摩在线观看| 欧美成人三级在线| 奇米色一区二区三区四区| 欧美精品在线观看一区二区| 亚洲一区在线视频| 欧美日韩在线观看一区二区 | 亚洲综合色视频| 91猫先生在线| 亚洲激情欧美激情| 91激情在线视频| 亚洲黄色性网站| 在线观看日韩一区| 亚洲一区二区黄色| 欧美日韩电影在线播放| 日韩电影在线免费看| 91精品国产入口在线| 麻豆一区二区三| 久久久国产精华| 成人深夜在线观看| 亚洲欧洲中文日韩久久av乱码| 91久久香蕉国产日韩欧美9色| 亚洲五月六月丁香激情| 在线不卡a资源高清| 精油按摩中文字幕久久| 久久久久青草大香线综合精品| 国产91露脸合集magnet| 综合久久久久久| 欧洲生活片亚洲生活在线观看| 亚洲成在人线免费| 日韩三级精品电影久久久 | 亚洲成人午夜影院| 91精品国产入口| 国产精品一区二区你懂的| 国产精品国产自产拍在线| 色哟哟日韩精品| 日韩av二区在线播放| 久久精品夜色噜噜亚洲aⅴ| eeuss影院一区二区三区| 亚洲综合丝袜美腿| 日韩精品一区二区在线| 国产 日韩 欧美大片| 亚洲午夜久久久久久久久久久 | 欧美一级在线观看| 国产激情偷乱视频一区二区三区 | 国产麻豆成人传媒免费观看| 日韩伦理av电影| 91精品婷婷国产综合久久性色| 国内精品国产三级国产a久久| 国产精品久久久久久亚洲毛片 | 国产欧美日本一区二区三区| 91网站在线播放| 久久国产精品99久久久久久老狼| 国产农村妇女毛片精品久久麻豆| 色婷婷亚洲婷婷| 国产老妇另类xxxxx| 亚洲宅男天堂在线观看无病毒| 日韩网站在线看片你懂的| youjizz国产精品| 久久国内精品自在自线400部| 综合激情网...| 欧美大肚乱孕交hd孕妇| 99国产精品久久久久久久久久| 蜜桃一区二区三区在线观看| 亚洲欧洲国产日本综合| 日韩欧美你懂的| 欧洲av一区二区嗯嗯嗯啊| 丁香婷婷综合激情五月色| 亚洲成va人在线观看| 一区在线中文字幕| 久久众筹精品私拍模特| 欧美日本精品一区二区三区| eeuss鲁片一区二区三区在线看| 久久99精品国产麻豆婷婷| 亚洲福利国产精品| 《视频一区视频二区| 久久老女人爱爱|