本文整理汇总了PHP中mexit函数的典型用法代码示例。如果您正苦于以下问题:PHP mexit函数的具体用法?PHP mexit怎么用?PHP mexit使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mexit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cancel
public function cancel()
{
// Check for request forgeries
MRequest::checkToken() or mexit('Invalid Token');
$vars = '&ja_tbl_g=' . base64_encode($this->_table) . '&ja_qry_g=' . base64_encode($this->_query);
$this->setRedirect('index.php?option=com_miwosql' . $vars, $msg);
}
示例2: SendResults
function SendResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '')
{
echo '<script type="text/javascript">';
echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . str_replace('"', '\\"', $fileUrl) . '","' . str_replace('"', '\\"', $fileName) . '","' . str_replace('"', '\\"', $customMsg) . '");';
echo '</script>';
mexit();
}
示例3: fileUpload
function fileUpload($resourceType, $currentFolder)
{
$sErrorNumber = '0';
$sfileName = '';
$c_upload = new cls_upload();
$c_upload->current_dir = $currentFolder;
$uploadfile = $c_upload->local_upload('Newfile', $resourceType);
unset($c_upload);
if ($uploadfile['error']) {
$sErrorNumber = '202';
} else {
$sErrorNumber = '0';
$sfileName = tag2atm($uploadfile['remote']);
}
echo '<script type="text/javascript">';
echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace('"', '\\"', $sfileName) . '");';
echo '</script>';
mexit();
}
示例4: unset
}
}
unset($a_field);
tabfooter('newcommu');
check_submit_func($submitstr);
_footer();
} else {
$_da =& $actuser->info;
_aenter($_da, 1);
@extract($btags);
extract($_da, EXTR_OVERWRITE);
tpl_refresh($tplname);
@(include M_ROOT . "template/{$templatedir}/pcache/{$tplname}.php");
$_content = ob_get_contents();
ob_clean();
mexit($_content);
}
} else {
load_cache('mlfields');
include_once M_ROOT . "./include/fields.cls.php";
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/cheader.inc.php";
include_once M_ROOT . "./include/mcuedit.cls.php";
$inajax ? aheader() : _header();
if (!empty($mcommu['setting']['norepeat']) && ($cid = $db->result_one("SELECT cid FROM {$tblprefix}mflinks WHERE mid='{$mid}' AND fromid='{$memberid}' ORDER BY cid"))) {
mcmessage('dorepeataddflink', axaction(2, M_REFERER));
}
$db->query("INSERT INTO {$tblprefix}mflinks SET\n\t\t\tmid='{$mid}',\n\t\t\tmname='" . $actuser->info['mname'] . "',\n\t\t\tfromid='{$memberid}',\n\t\t\tfromname='" . $curuser->info['mname'] . "',\n\t\t\tcreatedate='{$timestamp}'\n\t\t\t");
if ($cid = $db->insert_id()) {
$uedit = new cls_mcuedit();
$uedit->read($cid, 'flink');
示例5: doJob
static function doJob()
{
if (!Options::get("fork")) {
return true;
}
if (!self::$jobstats) {
self::initJobServer();
}
if (isset(Options::get("maxload"))) {
list($min1, $min5, $min15) = sys_getloadavg();
while ($min1 > Options::get("maxload")) {
CliDebug::warn(sprintf("Waiting for lower loadavg (actual=%f,max=%f)\n", $min1, Options::get("maxload")));
self::systemStats(5);
list($min1, $min5, $min15) = sys_getloadavg();
}
}
/* if (isset(Options::get("maxbackends"))) {
$cnt=self::zbackends();
$cnt2=self::mbackends();
while ($cnt>Options::get("maxbackends") || $cnt2>Options::get("maxbackends")) {
CliDebug::warn(sprintf("Waiting for lower number of psql backends (actual=[zabbix=%d,monda=%d],max=%d)\n",$cnt,$cnt2,Options::get("maxbackends")));
$stat=self::systemStats(10);
$cnt= self::zbackends();
$cnt2=self::mbackends();
}
} */
if (isset(Options::get("maxcpuwait"))) {
while (self::$jobstats["iowait"] > Options::get("maxcpuwait")) {
CliDebug::warn(sprintf("Waiting for lower iowait (actual=%f,max=%f)\n", self::$jobstats["iowait"], Options::get("maxcpuwait")));
self::systemStats(5);
}
}
if (!function_exists('pcntl_fork') || !function_exists('pcntl_wait') || !function_exists('pcntl_wifexited')) {
CliDebug::warn("pcntl_* functions disabled, cannot fork!\n");
return true;
}
if (self::$childs < Options::get("fork")) {
$pid = pcntl_fork();
if ($pid == -1) {
mexit(3, "Cannot fork");
} else {
if ($pid) {
self::$childpids[] = $pid;
self::$childs++;
//CliDebug::info("Jobserver: Parent (childs=self::$childs)\n");
return false;
} else {
putenv("MONDA_CHILD=1");
//CliDebug::info("Jobserver: Child (childs=self::$childs)\n");
return true;
}
}
} else {
self::waitForChilds();
}
}
示例6: cls_archive
$arc = new cls_archive();
if (empty($auth)) {
follow_dynamic($aid, 'down', $temparr);
//统计全部统一到函数之中进行
} else {
$midarr = explode("\t", authcode($auth, 'DECODE'));
if ($midarr[0] == $memberid && $midarr[1] == $aid && $midarr[2] == $temparr['tname'] && $midarr[3] == $temparr['tmode'] && $midarr[4] == $temparr['fid']) {
$arc->arcid($aid);
$arc->detail_data();
if (!$arc->aid) {
message('choosearchive');
}
if (!$arc->archive['checked']) {
message('poinarcnoche');
}
if (empty($temparr['tmode'])) {
if ($temp = @unserialize($arc->archive[$temparr['tname']])) {
$temp = @$temp[$temparr['fid']];
}
} else {
$temp = @explode('#', $arc->archive[$temparr['tname']]);
}
$url = view_atmurl(@$temp['remote']);
unset($temp);
empty($url) && message('noattach');
down_url($url);
mexit();
} else {
message('attachdownerr');
}
}
示例7: down_url
function down_url($url)
{
if (islocal($url)) {
file_down(local_file($url));
} else {
header("location:{$url}");
}
mexit();
}
示例8: createDbo
protected static function createDbo()
{
mimport('framework.database.table');
$conf = self::getConfig();
$host = $conf->get('host');
$user = $conf->get('user');
$password = $conf->get('password');
$database = $conf->get('db');
$prefix = $conf->get('dbprefix');
$driver = $conf->get('dbtype');
$debug = $conf->get('debug');
$options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $password, 'database' => $database, 'prefix' => $prefix);
$db = MDatabase::getInstance($options);
if ($db instanceof Exception) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
mexit('Database Error: ' . (string) $db);
}
if ($db->getErrorNum() > 0) {
die(sprintf('Database connection error (%d): %s', $db->getErrorNum(), $db->getErrorMsg()));
}
$db->setDebug($debug);
return $db;
}
示例9: htmlcac_dir
$cachefile = htmlcac_dir('farc', '', 1) . cac_namepre($fid) . '_' . $page . '.php';
if (is_file($cachefile) && filemtime($cachefile) > $timestamp - $cache1circle * 60) {
mexit(read_htmlcac($cachefile));
}
}
if (!($tplname = $freeinfos[$fid]['tplname'])) {
message('definereltem');
}
$_da = array('fid' => $fid, 'sid' => $sid, 'addid' => $addid);
$_mp = array();
$_mp['durlpre'] = view_url(en_virtual('info.php?fid=' . $fid . ($addid ? "&addid={$addid}" : '') . '&page={$page}', 1));
$_mp['static'] = 0;
$_mp['nowpage'] = max(1, intval($page));
$_mp['s_num'] = 0;
//静态页数不限
@extract($btags);
extract($_da, EXTR_OVERWRITE);
_aenter($_da, 1);
tpl_refresh($tplname);
@(include M_ROOT . "template/{$templatedir}/pcache/{$tplname}.php");
$_content = ob_get_contents();
ob_clean();
if (!$addid && $cache1circle) {
save_htmlcac($_content, $cachefile);
}
mexit($_content);
}
mexit(lang('pageparammiss'));
?>
示例10: mcfooter
function mcfooter()
{
global $copyright, $cms_power, $cms_icpno, $inajax, $infloat, $cms_version;
if ($inajax) {
afooter();
}
if (!$infloat) {
?>
<div class="blank9"></div>
</div></td>
</tr>
</table>
</div>
</div><!--con_con-->
</div><!--conBox-->
</div>
<div class="blank9"></div>
<div class="area lineheight200 copy">
Copyright © 2008-2012 <a href="http://www.08cms.com" target="_blank">08cms.com</a> All rights reserved.<br />
Powered by 08CMS v<?php
echo $cms_version;
?>
Code © 2008-2009 08cms.com Corporation
</div>
<!--</div>--><?php
} else {
echo '</div></div>';
}
?>
</body>
</html>
<?php
mexit();
}
示例11: afooter
function afooter()
{
global $copyright, $cms_power, $inajax, $infloat, $no_afooter, $callback;
if (!empty($callback)) {
$s = ob_get_contents();
ob_clean();
mexit("js_callback('" . addcslashes($s, "\\\r\n'") . "','{$callback}')");
}
if ($inajax) {
$s = ob_get_contents();
ob_end_clean();
$s = preg_replace("/([-\v-\f-])+/", ' ', $s);
$s = str_replace(array(chr(0), ']]>'), array(' ', ']]>'), $s);
echo $s . ']]></root>';
mexit();
}
if (empty($no_afooter)) {
if (!$infloat) {
?>
</div>
<div class="blank9"></div>
<div class="copyFoot">
<p>Copyright © 2008-2012 <a href="http://www.08cms.com" target="_blank">08CMS</a> <?php
echo lang('dingyue_com');
?>
All rights reserved.</p><?php
}
?>
</div>
<div class="blank9"></div>
</body>
</html>
<?php
}
}
示例12: DoResponse
function DoResponse()
{
if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
return;
}
// Get the main request informaiton.
$sCommand = $_GET['Command'];
$sResourceType = $_GET['Type'];
$sCurrentFolder = $_GET['CurrentFolder'];
// Check if it is an allowed type.
if (!in_array($sResourceType, array('file', 'image', 'flash', 'media'))) {
return;
}
// Check the current folder syntax (must begin and start with a slash).
if (!ereg('/$', $sCurrentFolder)) {
$sCurrentFolder .= '/';
}
if (strpos($sCurrentFolder, '/') !== 0) {
$sCurrentFolder = '/' . $sCurrentFolder;
}
// Check for invalid folder paths (..)
if (strpos($sCurrentFolder, '..')) {
SendError(102, "");
}
// file Upload doesn't have to Return XML, so it must be intercepted before anything.
if ($sCommand == 'fileUpload') {
fileUpload($sResourceType, $sCurrentFolder);
return;
}
CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
// Execute the required command.
switch ($sCommand) {
case 'GetFolders':
GetFolders($sResourceType, $sCurrentFolder);
break;
case 'GetFoldersAndfiles':
GetFoldersAndfiles($sResourceType, $sCurrentFolder);
break;
case 'CreateFolder':
CreateFolder($sResourceType, $sCurrentFolder);
break;
}
CreateXmlFooter();
mexit();
}
示例13: check
public static function check($path, $ds = DIRECTORY_SEPARATOR)
{
if (strpos($path, '..') !== false) {
MError::raiseError(20, 'MPath::check Use of relative paths not permitted');
mexit();
}
$path = MPath::clean($path);
if (MPATH_ROOT != '' && strpos($path, MPath::clean(MPATH_ROOT)) !== 0) {
// Don't translate
//MError::raiseError(20, 'MPath::check Snooping out of bounds @ ' . $path);
//mexit();
}
return $path;
}
示例14: login_msg
//.........这里部分代码省略.........
$target = $infloat ? ' onclick="floatwin(\'close_' . $handlekey . '\');return floatwin(\'open_login\',this)"' : '';
if ($msgtype == 'message') {
$message = '<tr><td align="center" colspan="2"><br><br>' . $message;
if ($infloat) {
$message .= '<script reload="1">setTimeout("floatwin(\'close_' . $handlekey . '\')", 1250);floatwin(\'closeparent_' . $handlekey . '\')</script><br><br><br></tr>';
} elseif ($url_forward) {
if (preg_match('/[?&]entry=logout\\b/i', $url_forward)) {
$url_forward = '?entry=home';
}
$message .= "<br><br><a href=\"{$url_forward}\">" . lang('clickhere') . "</a>";
$message .= "<script reload=\"1\">setTimeout(\"redirect('{$url_forward}');\", 1250);</script><br><br></td></tr>";
} else {
$message .= '<br><br><br></tr>';
}
} elseif ($msgtype == 'error') {
#$message = '<tr><td align="center" colspan="2"><br>'.lang('cur_member').' '.$curuser->info['mname'].'<br><br>'.$message.
# $message = '<tr><td align="center" colspan="2"><br>'.$message.
#'<br><br>'.($memberid ? '<a href="login.php?action=logout">>>'.lang('logout_member').'</a>' : '<a href="login.php?action=login"'.$target.'>>>'.lang('login_member').'</a>').
#' <a href="'.$cms_abs.'">>>'.lang('goback_index').'</a><br><br></td></tr>';
$extra = isset($entry) && empty($isframe) && $entry != 'logout' ? '?isframe=1&' . $_SERVER['QUERY_STRING'] : (in_array($entry, array('header', 'menu', 'logout')) ? '' : '?' . $_SERVER['QUERY_STRING']);
$message = '<tr><td><form method="post" name="login" action="' . $extra . '"' . ($infloat ? " onsubmit=\"return ajaxform(this)\"" : '') . '>' . '<input type="hidden" name="isframe" value="1">' . '<input type="hidden" name="url_forward" value="' . $url_forward . '">' . '<table width="100%" border="0" cellpadding="0" cellspacing="0">' . '<tr class="txt"><td class="txtC w80">' . lang('admin_account') . '</td>' . '<td class="txt txtL"><input type="text" name="admin_mname" size="25"></td></tr>' . '<tr class="txt"><td class="txtC w80">' . lang('login_pwd') . '</td>' . '<td class="txt txtL"><input type="password" name="admin_password" size="25"></td></tr>';
if ($cms_regcode && in_array('admin', explode(',', $cms_regcode))) {
$message .= '<tr class="txt"><td class="txtC w80">' . lang('regcode') . '</td>' . '<td class="txt txtL"><input type="text" name="regcode" id="regcode" size="4" maxlength="4"> ' . '<img src="tools/regcode.php" style="vertical-align: middle;cursor:pointer;" onClick="this.src=\'tools/regcode.php\'"></td></tr>';
}
$message .= '<tr class="txtcenter"><td colspan="2"><input type="submit" class="btn" value="' . lang('submit') . '" /></td></tr></table></form></td></tr>';
} elseif ($msgtype == 'login') {
if (substr($handlekey, 0, 8) == 'new_new_') {
$message = '<script reload="1">setTimeout("floatwin(\'close_' . $handlekey . '\')", 1250)</script>' . '<td class="txt txtC">' . lang('passerror') . '</td></tr>';
} else {
$extra = isset($entry) && empty($isframe) && $entry != 'logout' ? '?isframe=1&' . $_SERVER['QUERY_STRING'] : (in_array($entry, array('header', 'menu', 'logout')) ? '' : '?' . $_SERVER['QUERY_STRING']);
$message = '<tr><td><form method="post" name="login" action="' . $extra . '"' . ($infloat ? " onsubmit=\"return ajaxform(this)\"" : '') . '>' . '<input type="hidden" name="isframe" value="1">' . '<input type="hidden" name="url_forward" value="' . $url_forward . '">' . '<table width="100%" border="0" cellpadding="0" cellspacing="0">' . '<tr class="txt"><td class="txtC w80">' . lang('admin_account') . '</td>' . '<td class="txt txtL"><input type="text" name="admin_mname" size="25"></td></tr>' . '<tr class="txt"><td class="txtC w80">' . lang('login_pwd') . '</td>' . '<td class="txt txtL"><input type="password" name="admin_password" size="25"></td></tr>';
if ($cms_regcode && in_array('admin', explode(',', $cms_regcode))) {
$message .= '<tr class="txt"><td class="txtC w80">' . lang('regcode') . '</td>' . '<td class="txt txtL"><input type="text" name="regcode" id="regcode" size="4" maxlength="4"> ' . '<img src="tools/regcode.php" style="vertical-align: middle;cursor:pointer;" onClick="this.src=\'tools/regcode.php\'"></td></tr>';
}
$message .= '<tr class="txtcenter"><td colspan="2"><input type="submit" class="btn" value="' . lang('submit') . '" /></td></tr></table></form></td></tr>';
}
} else {
if (substr($handlekey, 0, 8) == 'new_new_') {
$message = '<script reload="1">setTimeout("floatwin(\'close_' . $handlekey . '\')", 1250)</script>' . '<td class="txt txtC">' . lang('passerror') . '</td></tr>';
} else {
$extra = isset($entry) && empty($isframe) && $entry != 'logout' ? '?isframe=1&' . $_SERVER['QUERY_STRING'] : (in_array($entry, array('header', 'menu', 'logout')) ? '' : '?' . $_SERVER['QUERY_STRING']);
$message = '<tr><td><form method="post" name="login" action="' . $extra . '"' . ($infloat ? " onsubmit=\"return ajaxform(this)\"" : '') . '>' . '<input type="hidden" name="isframe" value="1">' . '<input type="hidden" name="url_forward" value="' . $url_forward . '">' . '<table width="100%" border="0" cellpadding="0" cellspacing="0">' . '<tr class="txt"><td class="txtC w80">' . lang('admin_account') . '</td>' . '<td class="txt txtL">' . $curuser->info['mname'] . ' >><a href=\'login.php?action=logout\'>' . lang('exit') . '</a></td></tr>' . '<tr class="txt"><td class="txtC w80">' . lang('login_pwd') . '</td>' . '<td class="txt txtL"><input type="password" name="admin_password" size="15"></td></tr>';
if ($cms_regcode && in_array('admin', explode(',', $cms_regcode))) {
$message .= '<tr class="txt"><td class="txtC w80">' . lang('regcode') . '</td>' . '<td class="txt txtL"><input type="text" name="regcode" id="regcode" size="4" maxlength="4"> ' . '<img src="tools/regcode.php" style="vertical-align: middle;cursor:pointer;" onClick="this.src=\'tools/regcode.php\'"></td></tr>';
}
$message .= '<tr class="txtcenter"><td colspan="2"><input type="submit" class="btn" value="' . lang('submit') . '" /></td></tr></table></form></td></tr>';
}
}
if ($infloat) {
aheader();
} else {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php
echo $lan_title;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo $mcharset;
?>
">
<link rel="stylesheet" rev="stylesheet" href="./images/admina/contentsAdmin.css" type="text/css" media="all">
<script type="text/javascript">function redirect(url){top.location.replace(url)}</script>
</head>
<body>
<?php
}
?>
<div style="margin:0 auto;margin-top:<?php
echo $inajax ? 0 : 200;
?>
px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb"><tr><td align="center">
<table width="400" border="0" cellpadding="8" cellspacing="0"<?php
echo $inajax ? '' : ' class="tabmain"';
?>
>
<tr style="text-align:center; text-indent:0;"><td colspan="2"><div class="conlist1 bdbot fB"><?php
echo $lan_title;
?>
</div></td></tr>
<?php
echo $message;
?>
</table>
</td></tr></table>
</div>
<?php
if ($infloat) {
afooter();
} else {
?>
</body>
</html>
<?php
}
mexit();
}
示例15: handleDie
public static function handleDie(&$error, $options)
{
// Deprecation warning.
MLog::add('MError::handleDie() is deprecated.', MLog::WARNING, 'deprecated');
$level_human = MError::translateErrorLevel($error->get('level'));
if (isset($_SERVER['HTTP_HOST'])) {
// Output as html
mexit("<br /><b>M{$level_human}</b>: " . $error->get('message') . "<br />\n");
} else {
// Output as simple text
if (defined('STDERR')) {
fwrite(STDERR, "M{$level_human}: " . $error->get('message') . "\n");
mexit();
} else {
mexit("M{$level_human}: " . $error->get('message') . "\n");
}
}
return $error;
}