点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业应用>> 新翔网络OA系统V1.0>> 源文件浏览
[商业版 200RMB] WebForm,下载次数:1 次 | 关键字: PHP MYSQL OA 办公 网络办公

源码截图

源码目录树

;
当前路径:Classes/PHPExcel/Shared/OLE.php
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP Version 4                                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2002 The PHP Group                                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license,      |
// | that is bundled with this package in the file LICENSE, and is        |
// | available at through the world-wide-web at                           |
// | http://www.php.net/license/2_02.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: Xavier Noguer <xnoguer@php.net>                              |
// | Based on OLE::Storage_Lite by Kawai, Takanori                        |
// +----------------------------------------------------------------------+
//
// $Id: OLE.php,v 1.13 2007/03/07 14:38:25 schmidt Exp $


/**
* Array for storing OLE instances that are accessed from
* OLE_ChainedBlockStream::stream_open().
* @var  array
*/
$GLOBALS['_OLE_INSTANCES'] = array();

/**
* OLE package base class.
*
* @author   Xavier Noguer <xnoguer@php.net>
* @author   Christian Schmidt <schmidt@php.net>
* @category   PHPExcel
* @package    PHPExcel_Shared_OLE
*/
class PHPExcel_Shared_OLE
{
    const OLE_PPS_TYPE_ROOT   =      5;
    const OLE_PPS_TYPE_DIR    =      1;
    const OLE_PPS_TYPE_FILE   =      2;
    const OLE_DATA_SIZE_SMALL = 0x1000;
    const OLE_LONG_INT_SIZE   =      4;
    const OLE_PPS_SIZE        =   0x80;

    /**
     * The file handle for reading an OLE container
     * @var resource
    */
    public $_file_handle;

    /**
    * Array of PPS's found on the OLE container
    * @var array
    */
    public $_list = array();

    /**
     * Root directory of OLE container
     * @var OLE_PPS_Root
    */
    public $root;

    /**
     * Big Block Allocation Table
     * @var array  (blockId => nextBlockId)
    */
    public $bbat;

    /**
     * Short Block Allocation Table
     * @var array  (blockId => nextBlockId)
    */
    public $sbat;

    /**
     * Size of big blocks. This is usually 512.
     * @var  int  number of octets per block.
    */
    public $bigBlockSize;

    /**
     * Size of small blocks. This is usually 64.
     * @var  int  number of octets per block
    */
    public $smallBlockSize;

    /**
     * Reads an OLE container from the contents of the file given.
     *
     * @acces public
     * @param string $file
     * @return mixed true on success, PEAR_Error on failure
    */
    public function read($file)
    {
        $fh = fopen($file, "r");
        if (!$fh) {
            throw new PHPExcel_Reader_Exception("Can't open file $file");
        }
        $this->_file_handle = $fh;

        $signature = fread($fh, 8);
        if ("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" != $signature) {
            throw new PHPExcel_Reader_Exception("File doesn't seem to be an OLE container.");
        }
        fseek($fh, 28);
        if (fread($fh, 2) != "\xFE\xFF") {
            // This shouldn't be a problem in pra...
完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号