當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。