本文整理汇总了PHP中response_header函数的典型用法代码示例。如果您正苦于以下问题:PHP response_header函数的具体用法?PHP response_header怎么用?PHP response_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了response_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
require_once 'pear-database-channel.php';
$channels = channel::listActive();
$inactive_channels = array();
if (auth_check('pear.admin')) {
$inactive_channels = channel::listInactive();
}
response_header("Channels", false, '<link rel="alternate" type="application/xbel+xml" href="xbel.php" title="Channel list as XBEL" />');
$tabs = array("List" => array("url" => "/channels/index.php", "title" => "List Sites."), "Add Site" => array("url" => "/channels/add.php", "title" => "Add your site."));
?>
<h1>Channels</h1>
<?php
print_tabbed_navigation($tabs);
?>
<h2>What's that?</h2>
<p>A number of third-party sites make it possible to install their
software package using the new <a href="/manual/en/guide.migrating.channels.php">channels</a>
feature of PEAR ≥ 1.4.0. Specific installation instructures are
provided on the individual pages.</p>
示例2: redirect
<?php
/* The bug system error page */
// Obtain common includes
require_once '../include/prepend.php';
// If 'id' is passed redirect to the bug page
$id = !empty($_GET['id']) ? (int) $_GET['id'] : 0;
if ($id) {
redirect("bug.php?id={$id}");
}
response_header('Bugs :: 404 Not Found');
?>
<h1>404 Not Found</h1>
<p>Doh.</p>
<?php
response_footer();
示例3: Copyright
+----------------------------------------------------------------------+
| Copyright (c) 2003-2005 The PEAR Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
response_header("Privacy Policy");
?>
<h1>Privacy Policy</h1>
<h2>» Email</h2>
<p>We will not give away your email address to anyone, who is not
related to the operations of pear.php.net. We will also <b>never</b>
ask you to send us any of your passwords via email.</p>
<h2>» Logfiles</h2>
<p>We are keeping logfiles of the requests that reach our web servers,
but we do only use those files for statistical purposes.</p>
示例4: response_header
* available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt.
* If you did not receive a copy of the PHP license and are unable to
* obtain it through the world-wide-web, please send a note to
* license@php.net so we can mail you a copy immediately.
*
* @category pearweb
* @package Bugs
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License
* @version $Id: quick-fix-desc.php 252104 2008-02-02 21:23:23Z dufuz $
*/
/**
* Obtain common includes
*/
require_once './include/prepend.inc';
response_header('How to retrieve the package version information');
?>
<h2>How to retrieve the version of your package</h2>
<p>
When reporting a bug, it is very helpful if you tell us which version
of the package you are using. You can obtain this number by opening
a shell and typing:
</p>
<pre>pear list|grep $packagename</pre>
<p>
Alternatively, type in <tt>pear list</tt> alone and search the
output for your package.
</p>
<?php
response_footer();
示例5: Copyright
+----------------------------------------------------------------------+
| Copyright (c) 2001-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
response_header('Announcing the PEAR Group');
?>
<h1>Announcing the PEAR Group</h1>
[August 20, 2003]
<div id="news-entry">
<p>
On 12th August 2003 <?php
echo user_link('ssb', true);
?>
, the founder of PEAR, announced
the forming of the PEAR Group, which will be the governing body of
PEAR. The full announcement can be
示例6: handle_pear_errors
function handle_pear_errors($error_obj)
{
response_header("Oops! We are sorry that you are unable to report an undocumented feature today.");
$error = "<p>Greetings! We are experiencing an error, and in the spirit of Open Source would like you to fix it. ";
$error .= "Or more likely, just wait and someone else will find and solve this.</p>\n";
$error .= "<p>It's our guess that the database is down. Argh!!!</p>\n";
// FIXME: If logged in, show other stuff....
response_footer($error);
exit;
}
示例7: Copyright
+----------------------------------------------------------------------+
| Copyright (c) 2003-2005 The PEAR Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
response_header("The PEAR Group: Version Naming");
?>
<h1>PEAR Group - Administrative Documents</h1>
<h2>» Version Naming</h2>
<p>Published: 26th Februray 2004</p>
<p>The PEAR Group would like to take this opportunity to define the
following version naming convention, which will be mandatory for all
packages from now on. All developers should attempt to move to
this new version naming scheme as soon as possible.</p>
<p>Vote Results: +1 (6), -1 (0), +0 (2)</p>
示例8: switch
switch (txfield('bug_type', $bug, isset($_POST['in']) ? $_POST['in'] : null)) {
case 'Feature/Change Request':
$bug_type = 'Request';
break;
case 'Documentation Problem':
$bug_type = 'Doc Bug';
break;
case 'Security':
$bug_type = 'Sec Bug';
break;
default:
case 'Bug':
$bug_type = 'Bug';
break;
}
response_header($show_bug_info ? "{$bug_type} #{$bug_id} :: " . htmlspecialchars($bug['sdesc']) : "You must be logged in", $bug_id != 'PREVIEW' ? "\n\t\t<link rel='alternate' type='application/rss+xml' title='{$bug['package_name']} Bug #{$bug['id']} - RDF' href='rss/bug.php?id={$bug_id}'>\n\t\t<link rel='alternate' type='application/rss+xml' title='{$bug['package_name']} Bug #{$bug['id']} - RSS 2.0' href='rss/bug.php?id={$bug_id}&format=rss2'>\n\t" : '');
// DISPLAY BUG
$thanks = isset($_GET['thanks']) ? (int) $_GET['thanks'] : 0;
switch ($thanks) {
case 1:
case 2:
display_bug_success('The bug was updated successfully.');
break;
case 3:
display_bug_success('Your comment was added to the bug successfully.');
break;
case 4:
$bug_url = "{$site_method}://{$site_url}{$basedir}/bug.php?id={$bug_id}";
display_bug_success("\n\t\t\tThank you for your help!\n\t\t\tIf the status of the bug report you submitted changes, you will be notified.\n\t\t\tYou may return here and check the status or update your report at any time.<br>\n\t\t\tThe URL for your bug report is: <a href='{$bug_url}'>{$bug_url}</a>.\n\t\t");
break;
case 6:
示例9: session_start
require_once '../../include/prepend.php';
session_start();
bugs_authenticate($user, $pw, $logged_in, $user_flags);
if (!$logged_in) {
response_header("Bugs admin suite");
response_footer("Please login");
exit;
}
$actions = array('list_lists', 'list_responses', 'phpinfo');
$action = !empty($_GET['action']) && in_array($_GET['action'], $actions) ? $_GET['action'] : 'list_lists';
if ($action === 'phpinfo') {
phpinfo();
exit;
}
response_header("Bugs admin suite");
inline_content_menu('/admin/', $action, array('phpinfo' => 'phpinfo()', 'list_lists' => 'Package mailing lists', 'list_responses' => 'Quick fix responses'));
if ($action === 'list_lists') {
$res = $dbh->query("\n\t\tSELECT name, list_email \n\t\tFROM bugdb_pseudo_packages \n\t\tWHERE project = 'php'\n\t\tAND LENGTH(list_email) > 0\n\t\tORDER BY list_email\n\t");
echo "<dl>\n";
while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {
echo "<dt>", $row['name'], ": </dt>\n<dd>", mailto_list(explode(',', $row['list_email'])), "</dd>\n";
}
echo "</dl>\n";
}
if ($action === 'list_responses') {
$res = $dbh->query("\n\t\tSELECT *\n\t\tFROM bug_resolves\n\t");
echo "<h3>List Responses</h3>";
echo "<pre>\n";
while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {
print_r($row);
示例10: mail
} else {
if (empty($row['passwd'])) {
$errors[] = "No password found for #{$bug_id} bug report, sorry.";
} else {
$resp = mail($row['email'], 'Password for ' . SITE_BIG . ' bug report #' . $bug_id, 'The password for ' . SITE_BIG . ' bug report #' . $bug_id . ' is ' . $row['passwd'] . '.', 'From: ' . PEAR_BOUNCE_EMAIL);
if ($resp) {
$success = 'The password for bug report #' . $bug_id . ' has been sent to ' . PEAR_Bugs_Utils::spamProtect($row['email'], 'text');
} else {
$errors[] = 'Sorry. Mail can not be sent at this time. Please try again later.';
}
}
}
} else {
$errors[] = 'Invalid bug id provided';
}
response_header('Bug Report Password Finder');
echo "<h1>Bug Report Password Finder</h1>\n";
report_error($errors);
if ($success) {
report_success($success);
}
?>
<p>
If you need to modify a bug report that you submitted, but have
forgotten what password you used, this utility can help you.
</p>
<p>
Enter in the number of the bug report, press the Send button
and the password will be mailed to the email address specified
示例11: array
}
$accounts .= " [<a href=\"/user/{$row['handle']}\">details</a>]<br />";
}
if (!$relid) {
$downloads = array();
$sth = $dbh->query("SELECT f.id AS `id`, f.release AS `release`," . " f.platform AS platform, f.format AS format," . " f.md5sum AS md5sum, f.basename AS basename," . " f.fullpath AS fullpath, r.version AS version" . " FROM files f, releases r" . " WHERE f.package = {$pacid} AND f.release = r.id");
while ($sth->fetchInto($row)) {
$downloads[$row['version']][] = $row;
}
}
// }}}
// {{{ page header
if ($version) {
response_header("Package :: {$name} :: {$version}");
} else {
response_header("Package :: {$name}");
}
html_category_urhere($pkg['categoryid'], true);
if ($relid) {
echo " :: " . make_link("/package/{$name}", $name);
}
print "<h2 align=\"center\">{$name}";
if ($version) {
print " {$version}";
}
print "</h2>\n";
// }}}
// {{{ Supeseded checks
$dec_messages = array('abandoned' => 'This package is not maintained anymore and has been superseded.', 'superseded' => 'This package has been superseded, but is still maintained for bugs and security fixes.', 'unmaintained' => 'This package is not maintained, if you would like to take over please go to <a href="/takeover.php">this page</a>.');
$dec_table = array('abandoned' => array('superseded' => 'Y', 'unmaintained' => 'Y'), 'superseded' => array('superseded' => 'Y', 'unmaintained' => 'N'), 'unmaintained' => array('superseded' => 'N', 'unmaintained' => 'Y'));
$apply_rule = null;
示例12: session_start
<?php
session_start();
require_once '../include/prepend.php';
unset($_SESSION['user']);
session_destroy();
response_header('Logout');
?>
<p>You've been logged out.</p>
<?php
response_footer();
示例13: response_header
<?php
response_header('Election :: ' . ucfirst($new));
?>
<h1>Confirm Election Details [Step 3]</h1>
<?php
if ($error) {
foreach ($error as $err) {
echo '<div class="errors">' . htmlspecialchars($err) . '</div>';
}
}
?>
<form name="newelection" action="/election/<?php
echo $new;
?>
.php" method="post">
<input type="hidden" name="step" value="4" />
<?php
if ($new == 'edit') {
?>
<input type="hidden" name="election_id" value="<?php
echo $election_id;
?>
" />
<?php
}
// if ($new == 'edit'):
?>
<input type="hidden" name="choices" value="<?php
echo $info['choices'];
?>
示例14: response_header
* that is bundled with this package in the file LICENSE, and is
* available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt.
* If you did not receive a copy of the PHP license and are unable to
* obtain it through the world-wide-web, please send a note to
* license@php.net so we can mail you a copy immediately.
*
* @category peclweb
* @package peclweb
* @author Daniel Convissor <danielc@php.net>
* @copyright Copyright (c) 2004 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License
* @version $Id$
* @see generate_captcha(), validate_captcha(), captcha-image.php
*/
response_header('CAPTCHA :: Help');
?>
<h1>CAPTCHA Help</h1>
<p>Some forms on the PECL website use
<a href="http://en.wikipedia.org/wiki/Captcha"><acronym
title="Completely Automated Public Turing test to tell Computers and Humans Apart"
>CAPTCHA</acronym></a>s in order to avoid our getting spammed.</p>
<?php
if (isset($_SESSION['captcha'])) {
?>
<p>Your CAPTCHA is <img src="/captcha-image.php" alt="CAPTCHA text" />.
If you are having a hard time reading it, reloading this page
示例15: Copyright
| Copyright (c) 2001-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
$Id$
*/
require_once "HTML/Form.php";
response_header("PEAR Administration - Package maintainers");
if (isset($_GET['pid'])) {
$id = (int) $_GET['pid'];
} else {
$id = 0;
}
$self = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES);
// Select package first
if (empty($id)) {
auth_require(true);
$values = package::listAllNames();
$bb = new BorderBox("Select package");
$form = new HTML_Form($self);
$form->addSelect("pid", "Package:", $values);
$form->addSubmit();
$form->display();