當前位置: 首頁>>代碼示例>>PHP>>正文


PHP nusoap_server::getHTTPBody方法代碼示例

本文整理匯總了PHP中nusoap_server::getHTTPBody方法的典型用法代碼示例。如果您正苦於以下問題:PHP nusoap_server::getHTTPBody方法的具體用法?PHP nusoap_server::getHTTPBody怎麽用?PHP nusoap_server::getHTTPBody使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在nusoap_server的用法示例。


在下文中一共展示了nusoap_server::getHTTPBody方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getHTTPBody

 function getHTTPBody($soapmsg)
 {
     //file_put_contents(dirname(__FILE__).'/logout.txt', $soapmsg);
     if (count($this->responseAttachments) > 0) {
         $soapmsg =& $this->_makeDIMEMessage($soapmsg);
     }
     return parent::getHTTPBody($soapmsg);
 }
開發者ID:dalinhuang,項目名稱:shopexts,代碼行數:8,代碼來源:nudime.php

示例2: getHTTPBody

 /**
  * gets the HTTP body for the current response.
  *
  * @param string $soapmsg The SOAP payload
  * @return string The HTTP body, which includes the SOAP payload
  * @access private
  */
 function getHTTPBody($soapmsg)
 {
     if (count($this->responseAttachments) > 0) {
         $params['content_type'] = 'multipart/related; type="text/xml"';
         $mimeMessage =& new Mail_mimePart('', $params);
         unset($params);
         $params['content_type'] = 'text/xml';
         $params['encoding'] = '8bit';
         $params['charset'] = $this->soap_defencoding;
         $mimeMessage->addSubpart($soapmsg, $params);
         foreach ($this->responseAttachments as $att) {
             unset($params);
             $params['content_type'] = $att['contenttype'];
             $params['encoding'] = 'base64';
             $params['disposition'] = 'attachment';
             $params['dfilename'] = $att['filename'];
             $params['cid'] = $att['cid'];
             if ($att['data'] == '' && $att['filename'] != '') {
                 if ($fd = fopen($att['filename'], 'rb')) {
                     $data = fread($fd, filesize($att['filename']));
                     fclose($fd);
                 } else {
                     $data = '';
                 }
                 $mimeMessage->addSubpart($data, $params);
             } else {
                 $mimeMessage->addSubpart($att['data'], $params);
             }
         }
         $output = $mimeMessage->encode();
         $mimeHeaders = $output['headers'];
         foreach ($mimeHeaders as $k => $v) {
             $this->debug("MIME header {$k}: {$v}");
             if (strtolower($k) == 'content-type') {
                 // PHP header() seems to strip leading whitespace starting
                 // the second line, so force everything to one line
                 $this->mimeContentType = str_replace("\r\n", " ", $v);
             }
         }
         return $output['body'];
     }
     return parent::getHTTPBody($soapmsg);
 }
開發者ID:E-SOFTinc,項目名稱:UFlp-Back-Office,代碼行數:50,代碼來源:nusoapmime.php


注:本文中的nusoap_server::getHTTPBody方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。