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


PHP set_header函数代码示例

本文整理汇总了PHP中set_header函数的典型用法代码示例。如果您正苦于以下问题:PHP set_header函数的具体用法?PHP set_header怎么用?PHP set_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: showConfigurationError

 /**
  * Stop script and show a configuration error page
  * 
  * @return void
  */
 public static function showConfigurationError()
 {
     while (ob_get_level()) {
         ob_end_clean();
     }
     set_header(404);
     $uri = Uri::getInstance()->getUri(false);
     $tpl = Template::getInstance();
     $tpl->setTemplateDir(HOOKS_DIR . DS . 'errors');
     $tpl->addTemplateDir(FW_DIR . DS . 'errors');
     $tpl->assign('uri', $uri);
     $tpl->assign('routeFilePath', trim(CACHE_DIR . DS . 'routes.xml'));
     $tpl->assign('tests', self::environmentTests());
     try {
         $tpl->setTemplate('configuration.html')->render();
     } catch (Exception $exc) {
         echo $exc->getMessage();
     }
     die;
 }
开发者ID:salomalo,项目名称:php-oxygen,代码行数:25,代码来源:error.class.php

示例2: set_header

<?php

include "header.php";
set_header("Daydream", "club_all");
?>
<form class="form-search row-fluid " style="margin:30px 0">
	<div class="input-append span7" >
		<input class="span6" value="哈尔滨工业大学" id="appendedInputButton" type="text" style="margin-top:0px;height:44px;font-weight:bold;font-size:20px;padding-bottom:0px">
		<button class="btn btn-large" type="button">Go!</button>
	</div>
	<a class="btn btn-large btn-inverse pull-right" style="margin-right:-30px"><strong><i class="icon-plus icon-white"></i> 创建组织</strong></a>
</form>
<div class="container min-height" id="all-club" style="background-image:url(./img/banner.png)">
	<div class="row-fluid">	
		<div class="tabbable tabs-left">
			<ul class="nav nav-tabs span2 pull-left" >
				<li><a href="#myclub" data-toggle="tab" ><big ><strong>我的组织</strong></big></a></li>
				<li class="active"><a href="#all_club" data-toggle="tab"><big ><strong>全校所有</strong></big></a></li>
				<li><a href="#int_club" data-toggle="tab"><big ><strong>兴趣圈</strong></big></a></li>
				<li><a href="#school_club" data-toggle="tab"><big ><strong>社团</strong></big></a></li>
				<li><a href="#acd_club" data-toggle="tab"><big ><strong>学院</strong></big></a></li>
				<li><a href="#other_club" data-toggle="tab"><big ><strong>其他</strong></big></a></li>		
			</ul>
			<div class="span9 allback pull-left">
			<div class="tab-content">			
				<div class="tab-pane" id="myclub">
					<div class="signclub shadow"> 
					<img src="./img/may.jpg" class="club-pic size100 pull-left">
					<div class="club-text">
						<div class="text-min"><a href="#"><strong>五月天,我们的青春</strong></a></div>						
							<small>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:club_all.php

示例3: get_string

// In case user tries to manually access page - check that settings exist.
if (!$sgs->exists()) {
    $error = get_string('notconfigured', BLOCK_SG_LANG_TABLE);
} else {
    if ($sgs->date_restriction() && time() > $sgs->get_date()) {
        $error = get_string('dateexpired', BLOCK_SG_LANG_TABLE);
    } else {
        $groupingid = $sgs->get_grouping_id();
        $sgrouping = new skills_grouping($courseid);
        // If user is in group - display error.
        if ($sgrouping->check_for_user_in_grouping($USER->id) !== false) {
            $error = get_string('alreadyingroup', BLOCK_SG_LANG_TABLE);
        }
    }
}
set_header();
echo $OUTPUT->header();
display_header();
display_group_view();
display_buttons();
load_yui_modules($courseid, $groupingid, $error);
echo $OUTPUT->footer();
/**
 * This function set the page header -> JS/CSS includes.
 *
 */
function set_header()
{
    global $PAGE;
    $PAGE->requires->css('/blocks/skills_group/css/skills_group.css');
    $PAGE->requires->js_module(get_js_module_info('gallery-datatable-selection'));
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:31,代码来源:join_skills_group.php

示例4: set_header

<?php

include 'header.php';
$menu = set_header('contact');
require 'news_last.php';
$main = "<p>A única forma de contato é por email: <a href='mailto:r.gaia.cs@gmail.com'>r.gaia.cs@gmail.com</a>.</p>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:contact.php

示例5: set_header

<?php

include "header.php";
set_header("Daydream", "personal");
?>



<div class="container min-height tabbable" style="background-image:url(./img/banner.png)">	
	<div class="tabbable">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#tw" data-toggle="tab"><strong class="text-success"><i class="icon-retweet"></i>回复我</strong></a></li>
			<li><a href="#mytw" data-toggle="tab"><strong class="text-info"><i class="icon-reply"></i>我评论</strong></a></li>
			<li><a href="#li" data-toggle="tab"><strong class="text-error"><i class="icon-heart"></i>喜欢</strong></a></li>
		</ul>
		<div class="tab-content">
			<div class="tab-pane active" id="tw">			
				<h4 class="text-success"><ul class="breadcrumb">
					<li>新评论<span class="divider">/</span></li>									
					<li>读过<span class="divider">/</span></li>
					<li>未读</li>
				</ul></h4>
				<div class="alert alert-success span10">
					<a class="close" data-dismiss="alert">
						<i class="icon-remove"></i>
					</a>
					<img src="./img/guan.jpg" class="size40 img-circle"> 
					<strong><a href="#">马森</a>在话题</strong>中给你了评论 
					<i class="icon-quote-left"></i> 
						你说的很对,我也这么觉得,真的何赞
					<i class="icon-quote-right"></i>[<small>2012年3月25日 12:30</small>] <a class="badge badge-success pull-right">去看看</a>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:message.php

示例6: set_header

<?php

include "header.php";
set_header("Daydream", "activities");
?>
<div class="container min-height" >
<form class="form-horizontal">
    <fieldset class="pull-left" style="height:400px;width:550px;">
    <div id="legend" class="">
        <legend class="">创建活动</legend>
    </div>
	<div class="shadow"style="margin-left:00px;">
    <div class="control-group" >
		<label class="control-label" for="input01">名称</label>
          <!-- Text input--> 
        <div class="controls">
            <input type="text" placeholder="活动名称" class="input-xlarge shadow">
        </div>
    </div>
	<div class="control-group">
          <!-- Text input-->
        <label class="control-label" for="input01">标签</label>
        <div class="controls">
            <input type="text" placeholder="用逗号隔开,不要超过3个" class="input-xlarge">
        </div>
    </div>
	<div class="control-group">
        <label class="control-label">类型</label>
        <div class="controls">
      <!-- Inline Radios -->
		<label class="radio inline">
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:create_act_new.php

示例7: set_header

<?php

include 'header.php';
$menu = set_header('news');
require 'news_last.php';
$db = new PDO('sqlite:db.sqlite');
if (!isset($_GET["id"]) || empty($_GET["id"])) {
    $result = $db->query("SELECT id, data, titulo FROM noticias ORDER BY id DESC");
    if (!$result) {
        echo "Erro na consulta.<br>";
        exit;
    }
    $main = "<h2>Notícias</h2>\n        <table>\n        <tr>\n        <th>Data</th>\n        <th>Título</th>\n        </tr>";
    foreach ($result as $row) {
        $main = $main . "<tr><td>{$row['1']}</td><td><a href='news?id={$row['0']}'>{$row['2']}</a></td></tr>";
    }
    $main = $main . "</table>";
} else {
    $result = $db->query("SELECT data, titulo, mensagem FROM noticias WHERE id=" . $_GET["id"]);
    $row = $result->fetch();
    $main = "<h2>Notícia</h2><p>Data: {$row['0']}</p><p>Título: {$row['1']}</p><p>Mensagem: {$row['2']}</p>";
}
$db = NULL;
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:24,代码来源:news.php

示例8: sprintf

                        } else {
                            if ($total_folders > 1 && $total_files > 1) {
                                $summary = sprintf(_('%1$s folders and %2$s files, %3$s %4$s in total'), $total_folders, $total_files, $total_size['num'], $total_size['str']);
                            }
                        }
                    }
                }
            }
        }
    }
}
// Merge local settings with global settings
if (isset($loptions)) {
    $options = array_merge($options, $loptions);
}
$header = set_header($bootstrap_cdn);
$footer = set_footer();
// Set breadcrumbs
$breadcrumbs = "    <ol class=\"breadcrumb{$breadcrumb_style}\"" . $direction . ">" . PHP_EOL;
$breadcrumbs .= "      <li><a href=\"" . htmlentities($root_dir, ENT_QUOTES, 'utf-8') . "\">" . $icons['home'] . "</a></li>" . PHP_EOL;
foreach ($dir_name as $dir => $name) {
    if ($name != ' ' && $name != '' && $name != '.' && $name != '/') {
        $parent = '';
        for ($i = 0; $i <= $dir; $i++) {
            $parent .= rawurlencode($dir_name[$i]) . '/';
        }
        $breadcrumbs .= "      <li><a href=\"" . htmlentities($absolute_path . $parent, ENT_QUOTES, 'utf-8') . "\">" . $name . "</a></li>" . PHP_EOL;
    }
}
$breadcrumbs = $breadcrumbs . "    </ol>" . PHP_EOL;
// Show search
开发者ID:siwaphol,项目名称:nong_bootstraplistr,代码行数:31,代码来源:index.php

示例9: set_header

<?php

include 'header.php';
$menu = set_header('links');
require 'news_last.php';
$main = "<h2>Links úteis</h2>\n    <table cellspacing='10'>\n    <tr>\n    <td><a href='http://www.imecc.unicamp.br/~camecc'><img src='images/camecc_logo.png' alt='logo' name='logo' height='100' id='logo_camecc' /></a></td>\n    <td><a href='http://www.dceunicamp.org.br/'><img src='images/dce.png' alt='logo' name='logo' height='100' id='logo_dce' /></a></td>\n    <td><a href='http://www.ime.unicamp.br/'><img src='images/imecc.png' alt='logo' name='logo' height='100' id='logo_imecc' /></a></td>\n    <td><a href='http://www.unicamp.br/'><img src='images/unicamp.png' alt='logo' name='logo' height='100' id='logo_unicamp' /></a></td>\n    </tr>\n    </table>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:links.php

示例10: validate_session

function validate_session($exists = false)
{
    if ($exists) {
        if (isset($_SESSION['dob'])) {
            set_header('app');
            exit;
        }
    } else {
        if (!isset($_SESSION['dob'])) {
            set_header('login');
            exit;
        }
    }
}
开发者ID:nirwandogra,项目名称:school-work,代码行数:14,代码来源:functions.inc.php

示例11: set_header

<?php

include 'header.php';
$menu = set_header('about');
require 'news_last.php';
$main = "<h2>História</h2>\n<p>O CAMECC Cursos foi idealizado por Raniere Silva em 2012 para organizar o curso de LaTeX preparado por ele e manter o material do curso disponível a todos.</p>\n<h2>Missão</h2>\n<p>Manter material de auxílio técnico (referentes a softwares livres e/ou abertos) para os alunos vinculados ao IMECC e organizar cursos com base neste material.</p>\n<h2>Valores</h2>\n<p>Liberdade e honestidade.</p>\n<h2>Equipe</h2>\n<p>Hoje, o CAMECC Cursos encontra-se sobre responsabilidade de Raniere Silva com a colaboração de:\n<ul>\n<li>Vinícius Ignácio.</li>\n</ul></p>\n<p>A seguir uma lista de antigos colaboradores:</p>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:about.php

示例12: set_header

<?php

include "header.php";
set_header("Daydream", "home");
?>
<div class="container min-height" style="background-image:url(./img/banner.png)">
	
	<div class="content">
		<h4>晚上好,马森,今天过得还愉快吗?</h4>
		<hr class="bs-docs-separator">
		<div class="stream-content">	
			<div class="stream-item">
				<a href="club_home_new.php"><img src="./img/may.jpg" class="polaroid size48 pull-left" ></a>
				<div class="popover right">
					<div class="arrow"></div>					
						<div class="stream-header">
							<strong class="pull-left"><a href="club_home_new.php">五月天,致青春</a></strong>						
							<a href="#"><span class="pull-right text-error" id="like"> <i class="icon-heart icon-white"></i> 喜欢</span></a>
						</div>
						<br />
						<p class="stream-text">每次听到倔强,无论生活中有多大的困难,我都会鼓起勇气,去迎接明天的生活,因为这是我的青春,“当我和世界不一样,那就让我不一样,坚持对我来说,就是以刚克刚”。呵呵</p>					
					<div class="stream-item-footer">
						<span  class="time-off">
							<small class="muted">2012/10/1 12:33 来自 
								<a href="#">马森</a>								
							</small> 
						</span>					
						<div class="muted pull-right">
							<span ><small ><i class="icon-remove"></i> 删除</small></span>							
							<span><small ><i class="icon-retweet"></i> 评论</small></span>
						</div>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:index.php

示例13: set_header

<?php

include 'header.php';
$menu = set_header('courses');
require 'news_last.php';
$main = "<h2>GNU Octave</h2>\n    <p>\"GNU Octave é uma linguagem computacional, desenvolvida para computação matemática. Possui compatibilidade com Matlab, possuindo um grande número de funções semelhantes.\" (Fonte: <a href='http://pt.wikipedia.org/wiki/GNU_Octave'>http://pt.wikipedia.org/wiki/GNU_Octave</a>)</p>\n    <p>Ainda não produzimos nenhuma material sobre GNU Octave. A seguir encontra-se uma lista de outros materiais produzido por terceiros.</p>\n    <ol>\n    <li>Básico</li>\n    <ul>\n    <li><a href='http://pt.wikibooks.org/wiki/GNU_Octave'>Wikibook sobre Gnu Octave</a></li>\n    </ul>\n    <li>Intermediádio</li>\n    <ul>\n    <li><a href='http://en.wikibooks.org/wiki/Octave_Programming_Tutorial'>Wikibook sobre GNU Octave</a> (em inglês)</li>\n    </ul>\n    <li>Avançado</li>\n    <ul>\n    <li><a href='http://www.gnu.org/software/octave/doc/interpreter/'>Documentação oficial</a> (em inglês)</li>\n    </ul>\n    </ol>\n    ";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:octave.php

示例14: __

    $form->setRequiredNote('<span class="required_note_star">*</span> <span class="required_note">' . __('denotes required field') . '</span>');
    $form->display();
    print '</div>';
} elseif (!isset($_GET['htaccess'])) {
    ob_start();
    print '<h1>' . __('Welcome to EPESI setup!') . '<br></h1><h2>' . __('Hosting compatibility') . ':</h2><br><div class="license">';
    if (check_htaccess()) {
        $_GET['htaccess'] = 1;
        ob_end_clean();
    } else {
        print '</div><br><a class="button" href="setup.php?license=1&htaccess=1&install_lang=' . $install_lang_load . '">' . __('Ok') . '</a>';
        ob_end_flush();
    }
}
if (isset($_GET['htaccess']) && isset($_GET['license'])) {
    set_header(__('Configuration'));
    $form = new HTML_QuickForm('serverform', 'post', $_SERVER['PHP_SELF'] . '?' . http_build_query($_GET));
    $form->addElement('header', null, __('Database server settings'));
    $form->addElement('text', 'host', __('Database server address'));
    $form->addRule('host', __('Field required'), 'required');
    $form->addElement('text', 'port', __('Custom database port'));
    $form->addElement('select', 'engine', __('Database engine'), array('postgres' => 'PostgreSQL', 'mysqlt' => 'MySQL'));
    $form->addRule('engine', __('Field required'), 'required');
    $form->addElement('text', 'user', __('Database server user'));
    $form->addRule('user', __('Field required'), 'required');
    $form->addElement('password', 'password', __('Database server password'));
    $form->addRule('password', __('Field required'), 'required');
    $form->addElement('text', 'db', __('Database name'));
    $form->addRule('db', __('Field required'), 'required');
    $create_db_warn_msg = __('WARNING: Make sure you have CREATE access level to do this!');
    $form->addElement('select', 'newdb', __('Create new database'), array(0 => __('No'), 1 => __('Yes')), array('onChange' => 'if(this.value==1) alert("' . $create_db_warn_msg . '","warning");'));
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:setup.php

示例15: set_header

<?php

include "header.php";
set_header("Daydream", "");
?>
<div class="container row-fluid min-height" style="background-image:url(./img/banner.png)">
<form>  
       <h2>修改密码</h2>	
        <!-- Appended input-->
        <span class="pull-left span3"><label >原始密码</label>           
        <input  placeholder="placeholder" type="text"></span>
		<span class="pull-left span3"><label class="">新密码</label>           
        <input placeholder="placeholder" type="text"></span>
		<span class="pull-left span3"><label class="control-label">确认密码</label>           
        <input placeholder="placeholder" type="text"></span>
		<button class="btn btn-large btn-inverse" style="margin:25px ">确定</button>
</form>
<form style="background-color:#FBEED5;padding:10px">
    <fieldset >     
		<h2 >修改资料</h2>	
        <!-- Appended input-->
		<div class="span5"> 
			<img src="./img/na.jpg" class="size100"><a href="#"><strong>修改头像</strong></a>
			<label class="">姓名</label>           
			<input class="span8" placeholder="placeholder" type="text">           
			<p class="help-block"></p>      
			
			<label class="">性别</label>          
			<!-- Inline Radios -->
			<label class="radio inline">
			<input type="radio" value="男" name="sex" checked="checked">
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:change_self_information.php


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