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


PHP outputXml函数代码示例

本文整理汇总了PHP中outputXml函数的典型用法代码示例。如果您正苦于以下问题:PHP outputXml函数的具体用法?PHP outputXml怎么用?PHP outputXml使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: Send

 private function Send($to, $arr, $templeteId)
 {
     global $CONFIG;
     if ($CONFIG['solution_configuration'] == "debug") {
         return true;
     }
     //return true;
     $this->resetSDK();
     $result = $this->rest->sendTemplateSMS($to, $arr, $templeteId);
     if ($result->statusCode != 0) {
         $str = "error code :" . $result->statusCode . " ";
         $str .= "error msg :" . $result->statusMsg . " ";
         $res = outResult($result->statusCode, $result->statusMsg);
         outputXml($res);
         logger_mgr::logError("sms :{$str}");
         //echo $str;
         //TODO 添加错误处理逻辑
         return false;
     } else {
         $str = "Sendind TemplateSMS success! ";
         // 获取返回信息
         $smsmessage = $result->TemplateSMS;
         $str .= "dateCreated:" . $smsmessage->dateCreated . " ";
         $str .= "smsMessageSid:" . $smsmessage->smsMessageSid . "";
         //TODO 添加成功处理逻辑
         logger_mgr::logInfo("sms :{$str}");
         //echo $str;
         return true;
     }
     return false;
 }
开发者ID:alucard263096,项目名称:NCMI,代码行数:31,代码来源:sms.cls.php

示例2: outputXml

<?php

require '../include/common.inc.php';
include ROOT . '/classes/datamgr/banner.cls.php';
$last_time = $_REQUEST["last_time"];
$result = $bannerMgr->getBannerListByCondition("index_banner_%", $last_time);
outputXml($result);
开发者ID:alucard263096,项目名称:AMK,代码行数:7,代码来源:index_banner.php

示例3: run

/**
 * Scan dump directory for dump files (if any) and
 * create dcatap.rdf in the same directory
 *
 * @param array $options command line options to override defaults
 */
function run(array $options)
{
    // Load config variables and i18n a data blob
    if (!isset($options['config'])) {
        $options['config'] = 'config.json';
    }
    if (!is_file($options['config'])) {
        throw new Exception($options['config'] . " does not seem to exist");
    }
    $data = makeDataBlob($options['config']);
    // Load directories from config/options and test for existence
    if (!isset($options['dumpDir'])) {
        $options['dumpDir'] = $data['config']['directory'];
    }
    if (!is_dir($options['dumpDir']) or !is_readable($options['dumpDir'])) {
        throw new Exception($options['dumpDir'] . " is not a valid readable directory");
    }
    if (!isset($options['outputDir'])) {
        $options['outputDir'] = $data['config']['directory'];
    }
    if (!is_dir($options['outputDir']) or !is_writable($options['outputDir'])) {
        throw new Exception($options['outputDir'] . " is not a valid writable directory");
    }
    // add dump data to data blob
    $data['dumps'] = scanDump($options['dumpDir'], $data);
    // create xml string from data blob
    $xml = outputXml($data);
    file_put_contents($options['outputDir'] . "/dcatap.rdf", $xml);
}
开发者ID:wikimedia,项目名称:operations-dumps-dcat,代码行数:35,代码来源:DCAT.php

示例4: query

 /**
  * execute sql statement
  * @param string $sql: sql statement
  * @param string $type: default '', option: CACHE | UNBUFFERED
  * @param int $expires: Cache lifetime, second for unit
  * @param string $dbname: db name
  * @return resource
  */
 function query($sql)
 {
     global $CONFIG;
     if (!($query = @sqlsrv_query($this->conn, $sql))) {
         logger_mgr::logError("sql error :{$sql}");
         if ($this->in_trans) {
             $this->rollback_trans();
         }
         if ($CONFIG['solution_configuration'] == "debug") {
             $res = outResult(-1435, "Sql Error:" . $sql);
             outputXml($res);
         } else {
             $res = outResult(-1435, "Sql Error");
             outputXml($res);
         }
         $this->halt($msg, $sql);
     }
     logger_mgr::logDebug("sql :{$sql}");
     $this->querynum++;
     return $query;
 }
开发者ID:alucard263096,项目名称:AMK,代码行数:29,代码来源:sqlsrv.cls.php

示例5: DetailApi

 public function DetailApi($dbMgr, $id, $lang)
 {
     if ($this->XmlData["ismutillang"] == "1") {
         $sql = "select * from " . $this->XmlData["tablename"] . " m\n\t\tinner join " . $this->XmlData["tablename"] . "_lang ml on m.id=ml.oid and code='{$lang}' where id={$id}";
         $query = $dbMgr->query($sql);
         $result = $dbMgr->fetch_array_all($query);
     } else {
         $sql = "select * from " . $this->XmlData["tablename"] . " where id={$id}";
         $query = $dbMgr->query($sql);
         $result = $dbMgr->fetch_array_all($query);
     }
     outputXml($result);
 }
开发者ID:alucard263096,项目名称:NCMI,代码行数:13,代码来源:XmlModel.cls.php


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