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


PHP fURL::getDomain方法代码示例

本文整理汇总了PHP中fURL::getDomain方法的典型用法代码示例。如果您正苦于以下问题:PHP fURL::getDomain方法的具体用法?PHP fURL::getDomain怎么用?PHP fURL::getDomain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fURL的用法示例。


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

示例1: email_plugin_notify

function email_plugin_notify($check,$check_result,$subscription,$alt_email=false) {
  global $status_array;
  $user = new User($subscription->getUserId());
  $email = new fEmail();
  // This sets up fSMTP to connect to the gmail SMTP server
  // with a 5 second timeout. Gmail requires a secure connection.
  $smtp = new fSMTP(sys_var('smtp_server'), sys_var('smtp_port'), TRUE, 5);
  $smtp->authenticate(sys_var('smtp_user'), sys_var('smtp_pass'));
  if ($alt_email) {
    $email_address = usr_var('alt_email',$user->getUserId());
  } else {
    $email_address = $user->getEmail(); 
  }
  $email->addRecipient($email_address, $user->getUsername());
  // Set who the email is from
  $email->setFromEmail(sys_var('email_from'), sys_var('email_from_display'));
  // Set the subject include UTF-8 curly quotes
  $email->setSubject(str_replace('{check_name}', $check->prepareName(), sys_var('email_subject')));
  // Set the body to include a string containing UTF-8
  $state = $status_array[$check_result->getStatus()];
  $email->setHTMLBody("<p>$state Alert for {$check->prepareName()} </p><p>The check returned {$check_result->prepareValue()}</p><p>Warning Threshold is : ". $check->getWarn() . "</p><p>Error Threshold is : ". $check->getError() . '</p><p>View Alert Details : <a href="' . fURL::getDomain() . '/' . CheckResult::makeURL('list',$check_result) . '">'.$check->prepareName()."</a></p>");
  $email->setBody("
  $state Alert for {$check->prepareName()}
The check returned {$check_result->prepareValue()}
Warning Threshold is : ". $check->getWarn() . "
Error Threshold is : ". $check->getError() . "
           ");
  try {  
    $message_id = $email->send($smtp);
  } catch ( fConnectivityException $e) { 
    fCore::debug("email send failed",FALSE);
  }
}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:33,代码来源:email_plugin.php

示例2: strpos

		<meta property="og:title" content="Safecast" />
		<meta property="og:type" content="website" />
		<meta property="og:url" content="http://www.safecast.org" />
		<meta property="og:image" content="http://www.safecast.org/images/logo.png" />
		<meta property="og:site_name" content="Safecast" />
		<meta property="fb:admins" content="595809984" />
		<meta name="description" content="Safecast is a website that aggregates radioactivity data from throughout the world in order to provide real-time hyper-local information about the status of the Japanese nuclear crisis."> 
		<meta name="keywords" content="japan,fukushima,radiation,nuclear,reactor,geiger,counter,RDTN,Safecast">
		<title><?php 
echo $this->prepare('title');
echo strpos($this->get('title'), 'Safecast') === FALSE ? ' - Safecast' : '';
?>
</title>
		
		<base href="<?php 
echo fURL::getDomain() . URL_ROOT;
?>
" />


		<link rel="stylesheet" type="text/css" href="style/reset.css" media="screen" />
		<!--<link rel="stylesheet" type="text/css" href="style/base.css" media="screen" />-->
		<?php 
echo $this->place('css');
?>
		<script type="text/javascript" src="script/jquery-1.5.1.min.js"></script>
		<?php 
echo $this->place('js', 'js');
?>
		<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="excanvas.min.js"></script><![endif]-->
		<script type="text/javascript">  
开发者ID:hicapacity,项目名称:safecast.org,代码行数:31,代码来源:header_headless.php

示例3: isset

    fSession::destroy();
    fURL::redirect();
}
$uid = isset($_GET['uid']) ? htmlentities($_GET['uid']) : '{0}';
?>
<!DOCTYPE html>
<html>
<head>
    <title>Add card redirect</title>
    <style type="text/css">
        form {display: none}
    </style>
</head>
<body>
    <p>Redirecting, please wait...</p>
    <form name="addcard" action="<?php 
echo fURL::getDomain();
?>
/login_and_addcard.php" method="post">
        <label for="uid">Card to add</label>
        <input type="text" name="uid" value="<?php 
echo $uid;
?>
"/>
        <input type="submit" name="addcard" value="Add"/>
    </form>
    <script type="text/javascript">
        document.forms.addcard.submit();
    </script>
</body>
</html>
开发者ID:increpare,项目名称:hackspace-foundation-sites,代码行数:31,代码来源:addcard_form.php


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