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


PHP ZLog::GetWBXMLDebugInfo方法代码示例

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


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

示例1: NoPostRequestException

 }
 // Do the actual processing of the request
 if (Request::IsMethodGET()) {
     throw new NoPostRequestException("This is the Z-Push location and can only be accessed by Microsoft ActiveSync-capable devices", NoPostRequestException::GET_REQUEST);
 }
 // Do the actual request
 header(ZPush::GetServerHeader());
 // announce the supported AS versions (if not already sent to device)
 if (ZPush::GetDeviceManager()->AnnounceASVersion()) {
     $versions = ZPush::GetSupportedProtocolVersions(true);
     ZLog::Write(LOGLEVEL_INFO, sprintf("Announcing latest AS version to device: %s", $versions));
     header("X-MS-RP: " . $versions);
 }
 RequestProcessor::Initialize();
 if (!RequestProcessor::HandleRequest()) {
     throw new WBXMLException(ZLog::GetWBXMLDebugInfo());
 }
 // stream the data
 $len = ob_get_length();
 $data = ob_get_contents();
 ob_end_clean();
 // log amount of data transferred
 // TODO check $len when streaming more data (e.g. Attachments), as the data will be send chunked
 ZPush::GetDeviceManager()->SentData($len);
 // Unfortunately, even though Z-Push can stream the data to the client
 // with a chunked encoding, using chunked encoding breaks the progress bar
 // on the PDA. So the data is de-chunk here, written a content-length header and
 // data send as a 'normal' packet. If the output packet exceeds 1MB (see ob_start)
 // then it will be sent as a chunked packet anyway because PHP will have to flush
 // the buffer.
 if (!headers_sent()) {
开发者ID:karanikn,项目名称:php-addressbook,代码行数:31,代码来源:index.php


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