本文整理汇总了PHP中getContent函数的典型用法代码示例。如果您正苦于以下问题:PHP getContent函数的具体用法?PHP getContent怎么用?PHP getContent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getContent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateFiles
function generateFiles($sufffix)
{
for ($i = 0; $i < 300; $i++) {
$content = getContent($i . $sufffix);
file_put_contents(dirname(__FILE__) . '/temp/MyClass' . $i . $sufffix . '.class.php', '<?php ' . $content . ' ?>');
}
}
示例2: sendServiceMail
function sendServiceMail($weChartPost)
{
//******************** 配置信息 ********************************
$smtpserver = constant('SMTP_SERVER');
//SMTP服务器
$smtpserverport = constant('SMTP_SERVER_PORT');
//SMTP服务器端口
$smtpusermail = constant('SMTP_USER_MAIL');
//SMTP服务器的用户邮箱
$smtpemailto = constant('SERVICE_MAIL');
//发送给谁
$smtpuser = constant('SMTP_USER');
//SMTP服务器的用户帐号
$smtppass = constant('SMTP_PASS');
//SMTP服务器的用户密码
$mailtitle = '我在照相馆预约信息';
//邮件主题
//$mailcontent = json_encode($weChartPost);//邮件内容
$mailcontent = getContent($weChartPost);
$mailtype = constant('MAIL_TYPE');
//邮件格式(HTML/TXT),TXT为文本邮件
//************************ 配置信息 ****************************
$smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
//这里面的一个true是表示使用身份验证,否则不使用身份验证.
$smtp->debug = false;
//是否显示发送的调试信息
$state = $smtp->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype);
if ($state == "") {
return $state;
}
return "OK";
}
示例3: showTemplate
function showTemplate()
{
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow" />
<meta name="author" content="Aron Heinecke" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Stylesheet" media="all" type="text/css" href="css/bootstrap.min.css">
<link rel="Stylesheet" media="all" type="text/css" href="css/default.css">
<script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
<link rel="icon" href="data:;base64,=">
<title>YAYD Frontend demonstration</title>
<?php
if (function_exists('getHead')) {
// include mod exclusive head content if function exists
getHead();
}
?>
</head>
<body>
<!--site-->
<?php
echo getContent();
?>
<!--/site-->
<script src="js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>
<?php
}
示例4: smarty_function_get_url
function smarty_function_get_url($params, &$smarty)
{
// Default options
$opts = array(
'default' => 'Not found',
'fix' => 'src|href|action'
);
$opts = array_merge($opts, $params);
// Make sure they passed a source url
if (isset($opts['url']))
{
$opts['url'] = $opts['url'];
}
else
{
die($opts['default']);
}
$sParam = '';
if (isset($opts['param'])) $sParam = $opts['param'];
// Retrieve the remote file
$content = @getContent($opts, $sParam);
// Make sure we actually got something
// if (!$content) die($opts['default']);
if (!$content);
// Output the contents to the template
return $content;
}
示例5: _moduleContent
function _moduleContent(&$smarty, $module_name)
{
require_once "modules/{$module_name}/libs/contentFreePBX.php";
$smarty->assign("title", _tr("PBX Configuration"));
$smarty->assign("icon", "/modules/{$module_name}/images/pbx_configuration.png");
$salida = getContent($smarty, $module_name, true);
return $salida;
}
示例6: getSomething
function getSomething($selector)
{
$content = getContent();
$features = $content->find($selector);
echo '<hr>';
foreach ($features as $feature) {
echo $feature->plaintext . '<p>';
}
}
示例7: renderSidebar
public function renderSidebar()
{
if (!$this->shouldRender()) {
return;
}
startbox();
echo getContent('sbWiki.' . $this->getCurrentPage());
stopbox();
}
示例8: getEvent
function getEvent($meeting, $u_ID, $level)
{
$query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc");
while ($ans = mysql_fetch_array($query)) {
if ($level > 2) {
getContent($ans['e_ID'], $u_ID);
}
}
}
示例9: parseInfo
function parseInfo($post, $ignoreQuotes = true, $deadline)
{
$info = array();
$info['time'] = extractDate($post[0]->childNodes->item(6)->textContent);
$info['daynum'] = getGameDay($post[0]->childNodes->item(6)->textContent, $deadline);
$info['poster'] = $post[0]->childNodes->item(4)->textContent;
$info['content'] = getContent($post[1], $ignoreQuotes);
return $info;
}
示例10: getColor
function getColor($id, $field, $im)
{
$data = getContent($id, $field);
if (!$data) {
die("ERROR: Could not retrieve team color for title id {$id} field {$field}.");
}
$rgb = explode(",", $data);
$color = imagecolorallocate($im, $rgb[0], $rgb[1], $rgb[2]);
return $color;
}
示例11: deleteMassage
function deleteMassage()
{
/* Функция удаления коментария */
if (isset($_POST['remove'])) {
$massage = array_reverse(getContent());
$id = $_POST['remove'];
unset($massage[$id]);
$massageDB = serialize($massage);
file_put_contents("1massage.db", $massageDB);
}
}
示例12: upperCaseAuthors
function upperCaseAuthors($xml)
{
do {
$aut = getContent('author', $xml);
if (strlen($aut) > 0) {
$names = explode(',', $aut);
$upperCaseAuthorsXML = '<AUTHOR key="' . $aut . '" SEARCH="' . str_replace(',', ',+', strtoupper(removeAccent(str_replace(' ', '+', $aut)))) . '"><NAME>' . $names[1] . '</NAME><SURNAME>' . $names[0] . '</SURNAME><UPP_NAME>' . strtoupper($names[1]) . '</UPP_NAME><UPP_SURNAME>' . strtoupper($names[0]) . '</UPP_SURNAME></AUTHOR>';
$xml = str_replace('<author>' . $aut . '</author>', $upperCaseAuthorsXML, $xml);
}
} while (strlen($aut) > 0);
return $xml;
}
示例13: getEvent
function getEvent($meeting, $u_ID, $level)
{
$query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc");
while ($ans = mysql_fetch_array($query)) {
$result = getEventCompletion($ans['e_ID']);
echo "<div class='col-lg-12 lv-event'>";
echo "<div class='panel panel-success' style='margin-top:10px;'>";
echo "<div class='panel-heading' style='font-size:2em'>议题: " . $ans['content'] . "<span class='pull-right' style='font-size:0.5em; padding-top:10px;'>实际完成率:{$result['0']}%; 参考完成率: {$result['1']}%;</span></div>";
echo "<div class='panel-body'>";
getContent($ans['e_ID'], $u_ID);
echo "</div></div></div>";
}
}
示例14: getEvent
function getEvent($meeting, $u_ID, $level)
{
$query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc");
while ($ans = mysql_fetch_array($query)) {
echo "<div style='border:1px solid #000;padding:5px 15px;margin-top:5px'>";
echo "<h4>议题:</h4> ";
echo $ans['content'];
if ($level > 2) {
getContent($ans['e_ID'], $u_ID);
}
echo "</div>";
}
}
示例15: processAction
function processAction()
{
$action = assign_input('action', 'R');
$folderID = assign_input('folderID', 'R');
$noteID = assign_input('noteID', 'R');
$parentFolder = assign_input('parentFolder', 'R');
$date = assign_input('date', 'R');
$name = assign_input('name', 'R');
$note = assign_input('note', 'P', 1);
$sortByDate = assign_input('sortByDate', 'R');
switch ($action) {
case 'newFolder':
$res = newFolder($name, $parentFolder);
break;
case 'newNote':
$res = newNote($name, $note, $parentFolder);
break;
case 'toNewFolder':
$res = addToNewFolder($parentFolder, $noteID);
break;
case 'delete':
$res = delete_($noteID ? $noteID : $folderID, $folderID);
break;
case 'rename':
$res = rename_($name, $noteID ? $noteID : $folderID, $folderID);
break;
case 'save':
$res = save($noteID, $note);
break;
case 'get':
$res = getContent($parentFolder, $sortByDate ? 1 : 0);
break;
case 'loadNote':
$res = loadNote($noteID);
break;
case 'search':
break;
default:
$res = array("error" => "no action");
}
/*
if(( isset($res['error']))&&($res['error'])){echo 'Error occured : '.$res['error'].'<br/>';}
if($action=='get'){
echo json_encode($res);
}
*/
echo json_encode($res);
}