本文整理汇总了PHP中OLE::Asc2Ucs方法的典型用法代码示例。如果您正苦于以下问题:PHP OLE::Asc2Ucs方法的具体用法?PHP OLE::Asc2Ucs怎么用?PHP OLE::Asc2Ucs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OLE
的用法示例。
在下文中一共展示了OLE::Asc2Ucs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OLE
/**
* Constructor
*
* @access public
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
*/
function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
{
$_ole = new OLE();
$_sys = new System();
$this->_tmp_dir = $_sys->tmpdir();
$this->OLE_PPS(null, $_ole->Asc2Ucs('Root Entry'), OLE_PPS_TYPE_ROOT, null, null, null, $time_1st, $time_2nd, null, $raChild);
}
示例2: OLE_PPS_Root
/**
* Constructor
*
* @access public
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
*/
function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
{
$this->_tmp_dir = '';
$this->OLE_PPS(
null,
OLE::Asc2Ucs('Root Entry'),
OLE_PPS_TYPE_ROOT,
null,
null,
null,
$time_1st,
$time_2nd,
null,
$raChild);
}
示例3: __construct
/**
* Constructor
*
* @access public
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
*/
function __construct($time_1st, $time_2nd, $raChild)
{
$this->_tmp_dir = System::tmpdir();
parent::__construct(
null,
OLE::Asc2Ucs('Root Entry'),
OLE_PPS_TYPE_ROOT,
null,
null,
null,
$time_1st,
$time_2nd,
null,
$raChild);
}
示例4: _storeOLEFile
/**
* Store the workbook in an OLE container
*
* @access private
* @return mixed true on success. PEAR_Error on failure
*/
function _storeOLEFile()
{
if ($this->_BIFF_version == 0x600) {
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Workbook'));
} else {
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Book'));
}
if ($this->_tmp_dir != '') {
$OLE->setTempDir($this->_tmp_dir);
}
$res = $OLE->init();
if ($this->isError($res)) {
return $this->raiseError("OLE Error: " . $res->getMessage());
}
$OLE->append($this->_data);
$total_worksheets = count($this->_worksheets);
for ($i = 0; $i < $total_worksheets; $i++) {
while ($tmp = $this->_worksheets[$i]->getData()) {
$OLE->append($tmp);
}
}
$root = new OLE_PPS_Root(time(), time(), array($OLE));
if ($this->_tmp_dir != '') {
$root->setTempDir($this->_tmp_dir);
}
$res = $root->save($this->_filename);
if ($this->isError($res)) {
return $this->raiseError("OLE Error: " . $res->getMessage());
}
return true;
}
示例5: storeOLEFile
/**
* Store the workbook in an OLE container
*
* @access private
* @return mixed true on success. PEAR_Error on failure
*/
protected function storeOLEFile()
{
if ($this->BIFF_version == 0x600) {
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Workbook'));
} else {
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Book'));
}
if ($this->temporaryDirectory != '') {
$OLE->setTempDir($this->temporaryDirectory);
}
$res = $OLE->init();
if ($this->isError($res)) {
return $this->raiseError('OLE Error: ' . $res->getMessage());
}
$OLE->append($this->data);
$total_worksheets = count($this->workSheet);
for ($i = 0; $i < $total_worksheets; ++$i) {
while ($tmp = $this->workSheet[$i]->getData()) {
$OLE->append($tmp);
}
}
$root = new OLE_PPS_Root(time(), time(), array($OLE));
if ($this->temporaryDirectory != '') {
$root->setTempDir($this->temporaryDirectory);
}
$res = $root->save($this->fileName);
if ($this->isError($res)) {
return $this->raiseError('OLE Error: ' . $res->getMessage());
}
return true;
}