本文整理汇总了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;
}
示例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);
示例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);
}
示例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;
}
示例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);
}