当前位置: 首页>>代码示例>>PHP>>正文


PHP DataProvider::close方法代码示例

本文整理汇总了PHP中DataProvider::close方法的典型用法代码示例。如果您正苦于以下问题:PHP DataProvider::close方法的具体用法?PHP DataProvider::close怎么用?PHP DataProvider::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataProvider的用法示例。


在下文中一共展示了DataProvider::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DataProvider

<?php

//include (dirname(__FILE__).'/config/cronconfig.php');
include '/home/jobbid/public_html/config/cronconfig.php';
include ROOT . DS . 'library' . DS . 'dataprovider.php';
$conn = new DataProvider();
$conn->onSpam();
$conn->close();
echo 'BAT CO CHO PHEP GUI EMAIL SPAM';
开发者ID:whoami15,项目名称:jobbid,代码行数:9,代码来源:cron_onspam.php

示例2: array

 function parse_workbook($f_header, $dp)
 {
     /*DBG*/
     $this->dbglog->debug("parse_workbook() function");
     $root_entry_block = $f_header->getLong(0x30);
     $num_fat_blocks = $f_header->getLong(0x2c);
     /*TRC*/
     $this->dbglog->trace("Header parsed");
     $this->fat = array();
     for ($i = 0; $i < $num_fat_blocks; $i++) {
         /*TRC*/
         $this->dbglog->trace("FOR LOOP iteration i =" . $i);
         $fat_block = $f_header->getLong(0x4c + 4 * $i);
         $fatbuf = $dp->get($fat_block * 0x200, 0x200);
         $fat = new DataProvider($fatbuf, DP_STRING_SOURCE);
         if ($fat->getSize() < 0x200) {
             /*DBG*/
             $this->dbglog->debug("parse_workbook() function found (strlen({$fat}) < 0x200) returns 6");
             return 6;
         }
         for ($j = 0; $j < 0x80; $j++) {
             $this->fat[] = $fat->getLong($j * 4);
         }
         $fat->close();
         unset($fat_block, $fatbuf, $fat);
     }
     /*DBG*/
     $this->dbglog->dump($this->fat, "\$fat");
     if (count($this->fat) < $num_fat_blocks) {
         /*DBG*/
         $this->dbglog->debug("parse_workbook() function found (count({$this->fat}) < {$num_fat_blocks}) returns 6");
         return 6;
     }
     $chain = $this->get_blocks_chain($root_entry_block);
     $dir = new DataProvider($dp->ReadFromFat($chain), DP_STRING_SOURCE);
     unset($chain);
     $this->sfat = array();
     $small_block = $f_header->getLong(0x3c);
     if ($small_block != 0xfeffffff) {
         $root_entry_index = $this->find_stream($dir, 'Root Entry');
         if ($root_entry_index < 0) {
             /*DBG*/
             $this->dbglog->debug("parse_workbook() function dont found Root Entry returns 6");
             return 6;
         }
         $sdc_start_block = $dir->getLong($root_entry_index * 0x80 + 0x74);
         $small_data_chain = $this->get_blocks_chain($sdc_start_block);
         $this->max_sblocks = count($small_data_chain) * 8;
         $schain = $this->get_blocks_chain($small_block);
         for ($i = 0; $i < count($schain); $i++) {
             $sfatbuf = $dp->get($schain[$i] * 0x200, 0x200);
             $sfat = new DataProvider($sfatbuf, DP_STRING_SOURCE);
             //$this->dbglog->dump( strlen($sfatbuf), "strlen(\$sftabuf)");
             //$this->dbglog->dump( $sfat, "\$sfat");
             if ($sfat->getSize() < 0x200) {
                 /*DBG*/
                 $this->dbglog->debug("parse_workbook() function found (strlen({$sfat}) < 0x200)  returns 6");
                 return 6;
             }
             for ($j = 0; $j < 0x80; $j++) {
                 $this->sfat[] = $sfat->getLong($j * 4);
             }
             $sfat->close();
             unset($sfatbuf, $sfat);
         }
         unset($schain);
         $sfcbuf = $dp->ReadFromFat($small_data_chain);
         $sdp = new DataProvider($sfcbuf, DP_STRING_SOURCE);
         unset($sfcbuf, $small_data_chain);
     }
     $workbook_index = $this->find_stream($dir, 'Workbook');
     if ($workbook_index < 0) {
         $workbook_index = $this->find_stream($dir, 'Book');
         if ($workbook_index < 0) {
             /*DBG*/
             $this->dbglog->debug("parse_workbook() function workbook index not found returns 7");
             return 7;
         }
     }
     $workbook_start_block = $dir->getLong($workbook_index * 0x80 + 0x74);
     $workbook_length = $dir->getLong($workbook_index * 0x80 + 0x78);
     $wb = '';
     if ($workbook_length > 0) {
         if ($workbook_length >= 0x1000) {
             $chain = $this->get_blocks_chain($workbook_start_block);
             $wb = $dp->ReadFromFat($chain);
         } else {
             $chain = $this->get_blocks_chain($workbook_start_block, true);
             $wb = $sdp->ReadFromFat($chain, 0x40);
             unset($sdp);
         }
         $wb = substr($wb, 0, $workbook_length);
         if (strlen($wb) != $workbook_length) {
             return 6;
         }
         unset($chain);
     }
     // Unset fat arrays
     unset($this->fat, $this->sfat);
     if (strlen($wb) <= 0) {
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:concourse,代码行数:101,代码来源:MsXlsGenerator.php


注:本文中的DataProvider::close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。