本文整理汇总了PHP中display_msg函数的典型用法代码示例。如果您正苦于以下问题:PHP display_msg函数的具体用法?PHP display_msg怎么用?PHP display_msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_msg函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_msg
$session->msg('s', "User account has been created! ");
// redirect('add_user.php', false);
} else {
//failed
echo 'papoy';
$session->msg('d', ' Sorry failed to create account!');
// redirect('add_user.php', false);
}
} else {
$session->msg("d", $errors);
echo 'pappppp';
// redirect('add_user.php', false);
}
}
include_once 'layouts/header.php';
echo display_msg($msg);
?>
<div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<strong>
<span class="glyphicon glyphicon-th"></span>
<span>Add New User</span>
</strong>
</div>
<div class="panel-body">
<div class="col-md-6">
<form method="post" action="add_user.php">
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="full-name" placeholder="Full Name">
示例2: display_msg
<script src="includes/lib/prototype.js" type="text/javascript"></script>
<script src="includes/src/effects.js" type="text/javascript"></script>
<script src="includes/validation.js" type="text/javascript"></script>
<link href="includes/style.css" rel="stylesheet" type="text/css" />
<link href="includes/simplecustomer.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
include 'includes/header.php';
?>
<div class="container">
<div class="leftcolumn">
<h2>Custom Fields </h2>
<?php
display_msg();
?>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<th colspan="3" scope="row"><br />
Field Name <br />
<input name="field_add" id="field_add" size="35" />
<br />
<br />
Optional drop down menu options<em> (separate by comma) </em><br />
<input name="field_content" id="field_content" size="45" />
示例3: RLsimpleXMLelement
function RLsimpleXMLelement($resp, $displayerrors = true)
{
$details = $resp;
if (($preend = strpos($resp, '<title><!DOCTYPE')) !== false && ($lastentry = strrpos($resp, "<entry>")) !== false) {
$details = substr($resp, $preend + 7, -7);
$resp = substr($resp, 0, $lastentry - 1) . "\n</feed>";
error_log("/lib/alfresco30/lib.php:: WARNING - Alfresco Server Error: {$details}");
if ($displayerrors) {
display_msg(get_string('incompletequeryresponse', 'block_repository'), $details);
}
}
$resp = preg_replace('/ /', ' ', $resp);
// TBD?
libxml_use_internal_errors(true);
try {
$sxml = new SimpleXMLElement($resp);
} catch (Exception $e) {
error_log("/lib/alfresco30/lib.php:: WARNING - Alfresco Server Error: BAD XML => {$details}");
if ($displayerrors) {
display_msg(get_string('badqueryresponse', 'block_repository'), $details);
}
if (debugging('', DEBUG_DEVELOPER)) {
if (!$displayerrors) {
echo 'Bad XML: ', $details;
}
echo "<br/><pre>\n";
foreach (libxml_get_errors() as $error) {
echo "\t", $error->message, "\n";
}
echo '</pre>';
}
return false;
}
return $sxml;
}
示例4: urlencode
Only administrators can access this page after logging in.<br />
<a href="<?php
echo ROOTMEMBERPATH;
?>
wp-login.php?redirect_to=<?php
echo urlencode(ROOTMEMBERPATH . 'grind-code/index.php/admin/index');
?>
">Log in now</a>.
<?php
} elseif (!$pwdBypass && $_SESSION['wpuser']['wp_role'] != WP_ADMIN_ROLE) {
?>
Only administrators can access this page.
You are
<?php
echo (in_array(substr($_SESSION['wpuser']['wp_role'], 0, 1), array('a', 'e', 'i', 'o', 'u')) ? "an" : "a") . " \"" . $_SESSION['wpuser']['wp_role'] . "\"";
?>
.<br />
<a href="<?php
echo ROOTMEMBERPATH;
?>
wp-login.php/redirect_to=/frontdesk/">Log in as an administrator now</a>.
<?php
} else {
if (isset($error)) {
display_msg($error);
}
echo $content;
}
echo $footer;
示例5: RLsimpleXMLelement
function RLsimpleXMLelement($resp, $displayerrors = false) {
//echo "RLsimpleXMLelement() => resp = {$resp}";
$details = $resp;
if (($preend = strpos($resp, '<title><!DOCTYPE')) !== false &&
($lastentry = strrpos($resp, "<entry>")) !== false) {
$details = substr($resp, $preend + 7, -7);
$resp = substr($resp, 0, $lastentry - 1) ."\n</feed>";
// error_log("repository/elisfiles/lib/lib.php:: WARNING - Alfresco Server Error: {$details}");
if ($displayerrors) {
display_msg(get_string('incompletequeryresponse', 'repository_elisfiles'),
$details);
}
}
$resp = preg_replace('/ /', ' ', $resp); // TBD?
libxml_use_internal_errors(true);
try {
$sxml = new SimpleXMLElement($resp);
} catch (Exception $e) {
// error_log("repository/elisfiles/lib/lib.php:: WARNING - Alfresco Server Error: BAD XML => {$details}");
if ($displayerrors) {
display_msg(get_string('badqueryresponse', 'repository_elisfiles'),
$details);
}
return false;
}
return $sxml;
}