• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP headers函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: curl_getinfo

    $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
    $respheaders = substr($data, 0, $header_size);
    $body = substr($data, $header_size);
    curl_close($curl);
    return $body;
}
function http_proxy_query($url)
{
开发者ID:Reeska,项目名称:restinpi,代码行数:8,代码来源:net.lib.php


示例2: ewiki_spage

function ewiki_spage($id, &$data, $action)
{
    global $ewiki_spages, $ewiki_plugins, $ewiki_t;
    $r = "";
    #-- filename from $id
    $fn = $ewiki_spages[strtolower($id)];
    #-- php file
    if (strpos($fn, ".php") || strpos($fn, ".htm")) {
        #-- start new ob level
        ob_start();
        ob_implicit_flush(0);
        #-- prepare environment
        global $ewiki_id, $ewiki_title, $ewiki_author, $ewiki_ring, $ewiki_t, $ewiki_config, $ewiki_action, $_EWIKI, $ewiki_auth_user, $ewiki_headers, $headers;
        $ewiki_headers = array();
        $headers =& $ewiki_headers;
        #-- execute script
        include $fn;
        #-- close ob
        $r = ob_get_contents();
        ob_end_clean();
        #-- add headers
        if ($ewiki_headers) {
            headers(implode("\n", $ewiki_headers));
        }
        $clean_html = true;
    } elseif (EWIKI_SPAGES_BIN && !headers_sent() && preg_match('#\\.(png|gif|jpe?g|zip|tar)#', $fn)) {
        $ct = "application/octet-stream";
        if (function_exists("mime_content_type")) {
            $ct = mime_content_type($fn);
        }
        header("Content-Type: {$ct}");
        header("ETag: ewiki:spages:" . md5($r) . ":0");
        header("Last-Modified: " . gmstrftime($ewiki_t["C"]["DATE"], filemtime($fn)));
        passthru($r);
    } else {
        $f = gzopen($fn, "rb");
        $r = gzread($f, 256 << 10);
        gzclose($f);
        #-- render as text/plain, text/x-wiki
        if ($r) {
            $r = $ewiki_plugins["render"][0]($r);
        }
    }
    #-- strip <html> and <head> parts (if any)
    if ($clean_html) {
        $r = preg_replace('#^.+<body[^>]*>(.+)</body>.+$#is', '$1', $r);
    }
    #-- return body (means successfully handled)
    return $r;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:50,代码来源:spages.php


示例3: ewiki_spage

function ewiki_spage($id, $data, $action)
{
    global $ewiki_spages, $ewiki_plugins;
    $r = "";
    #-- filename from $id
    $fn = $ewiki_spages[strtolower($id)];
    #-- php file
    if (strpos($fn, ".php") || strpos($fn, ".htm")) {
        #-- start new ob level
        ob_start();
        ob_implicit_flush(0);
        #-- prepare environment
        global $ewiki_id, $ewiki_title, $ewiki_author, $ewiki_ring, $ewiki_t, $ewiki_config, $ewiki_action, $_EWIKI, $ewiki_auth_user, $ewiki_headers, $headers;
        $ewiki_headers = array();
        $headers =& $ewiki_headers;
        #-- execute script
        include $fn;
        #-- close ob
        $r = ob_get_contents();
        ob_end_clean();
        #-- add headers
        if ($ewiki_headers) {
            headers(implode("\n", $ewiki_headers));
        }
    } else {
        $f = fopen($fn, "rb");
        $r = fread($f, 256 << 10);
        fclose($f);
        $r = $ewiki_plugins["render"][0]($r);
    }
    #-- strip <html> and <head> parts (if any)
    if (($l = strpos(strtolower($r), "<body")) && ($w = strpos(strtolower($r), "</body"))) {
        $l = strpos($r, ">", $l + 1) + 1;
        $w = $w - $l;
        $r = substr($r, $l, $w);
    }
    #-- return body (means successful handled)
    return $r;
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:39,代码来源:spages.php


示例4: enviar

function enviar($metodo, $op)
{
    global $conexao;
    $emailremetente = check_input($_POST['emailremetente']);
    if ($metodo == "Hospedagem") {
        $array_domain = array("@oi.com.br", "@gmail.com");
        foreach ($array_domain as $elemento) {
            $emailsender = str_replace("{$elemento}", "@127.0.0.1", $emailremetente);
        }
    } else {
        if ($metodo == "smtpGmail") {
            require_once "pp/class.phpmailer.php";
            $emailsender = smtplogin();
        }
    }
    $nomeremetente = check_input($_POST['nomeremetente']);
    $assunto = check_input($_POST['assunto']);
    $para = array();
    $para = explode("\n", check_input($_POST['para']));
    $boundary = "XYZ-" . md5(date("dmYis")) . "-ZYX";
    $message = "<div style='background-color:#FFF;color:#FFF;font-family:Arial;font-size:10px;'>";
    $message .= "--{$boundary}" . PHP_EOL;
    //$message .= "Content-Type: text/html; charset='utf-8'" . PHP_EOL;
    $message .= "</div>";
    $message .= "<div style='clear:both;background-color:#FFF;color:#000;'>" . opcao("{$op}") . "</div>";
    //mensagem
    $message .= "<div style='clear:both;margin-top:25px;margin-bottom:15px;height:1px;background-color:lightblue;width:100%;'></div>";
    /*if (isset($_FILES["anexo"]['name'])){
    			echo "Serviço indisponível para manuteção - att andre machado</br>";
    			echo var_dump($_FILES["anexo"]["tmp_name"]);
    			echo var_dump($_FILES["anexo"]["name"]);
    		$path = $_FILES["anexo"]['tmp_name']; 
    		$fileType = $_FILES["anexo"]['type']; 
    		$fileName = $_FILES["anexo"]['name'];
    		$fp = fopen( $path, "rb" ); // abre o arquivo enviado
    		$anexo = fread( $fp, filesize( $path ) ); // calcula o tamanho
    		$anexo = chunk_split(base64_encode( $anexo )); // codifica o anexo em base 64
    		fclose( $fp ); // fecha o arquivo
    
    		$message .= "Content-Type: ". $fileType ."; name=\"". $fileName . "\"" . PHP_EOL;
    		$message .= "Content-Transfer-Encoding: base64" . PHP_EOL;
    		$message .= "Content-Disposition: attachment; filename=\"". $fileName . "\"" . PHP_EOL;
    	}*/
    $message .= "<div style='color:#FFF;font-size:12px;font-weight:normal;font-family:Arial;'> --{$boundary} </div>" . PHP_EOL;
    imprime_headers($para, $nomeremetente, $emailsender, $emailremetente, $assunto);
    $x = 1;
    foreach ($para as $elemento) {
        ?>
	<div style="color:white;border:1px solid black;padding-left:15px;padding-bottom:0px;background-color:rgba(150,50,50,0.3);font-family:Arial;margin-bottom:5px;font-size:12px;">
		<div style="float:left;padding-top:8px;">
			<?php 
        echo "<div class='NUMERO'>{$x}</div>";
        echo "<div style='float:left;'>{$elemento}</div>";
        $x++;
        ?>
		</div>
		<?php 
        if ($metodo == "Hospedagem") {
            $headers = headers($emailsender, $emailremetente, $assunto);
            if (mail($elemento, $assunto, $message, implode("\r\n", $headers), "-r" . $emailsender) && disponivel($_SESSION['userid']) > 0) {
                ENVIADO($elemento, $metodo, $nomeremetente);
            } else {
                FALHA($elemento, $metodo, $nomeremetente);
            }
        } else {
            if ($metodo == "smtpGmail") {
                smtpmailer($elemento, $emailremetente, $nomeremetente, $assunto, $message, $metodo);
            }
        }
        ?>
		<div style="clear:both;"></div>
	</div>
		<?php 
    }
    ?>
<div class="imprime_msgSent">Terminou! Veja a mensagem que foi enviada:</div><?php 
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:#FFF;margin-bottom:5px;'>{$message}</div>";
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:rgba(255,255,255,0.5);margin-bottom:5px;color:black;'>" . htmlentities($message) . "</div>";
    if (isset($_SESSION['errorsmtp'])) {
        echo $_SESSION['errorsmtp'];
        unset($_SESSION['errorsmtp']);
    }
}
开发者ID:pedradanamente,项目名称:15.3.1,代码行数:83,代码来源:banco.php


示例5: headers

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "post-headerbar.php";
?>
<title><?php 
echo $hostname;
?>
 Dependency Checker Status</title>
</head>
<body>
<?php 
echo headers("post-commit checker", gen_postthirdbar("status"));
?>

<div class="content">
<h1>Status</h1>
<table border="0">
<tr><td>
Checking from:

<?php 
echo htmlspecialchars(trim(`{$conftool} -k svnloc`));
?>

<br><br>
<table border="1">
<tr><td>
开发者ID:rich-pixley,项目名称:zoo-animals,代码行数:31,代码来源:status.php


示例6: session_start

<?php

session_start();
require __DIR__ . '/../function/news-plus.php';
$article['image'] = $_POST['image'];
if (isset($_POST)) {
    $article = [];
    if (!empty($_POST['header'])) {
        $article['header'] = $_POST['header'];
        if (!empty($_POST['padding'])) {
            $article['padding'] = $_POST['padding'];
            if (headers($article)) {
                if (padding($article)) {
                    if (!empty($_FILES)) {
                        $res = image($_FILES);
                        if (false !== $res) {
                            $article['image'] = $res;
                            if (isset($article['header']) && isset($article['padding']) && isset($article['image'])) {
                                News::article_put($article);
                                header('Location:http://new/index.php?cntr=Newsed&act=All');
                                exit;
                            }
                        } else {
                            if (isset($article['header']) && isset($article['padding'])) {
                                News::article_two_put($article);
                                header('Location:http://new/index.php?cntr=Newsed&act=All');
                                exit;
                            }
                        }
                    } else {
                        $_SESSION['error'] = 'Статья не написана!';
开发者ID:leyn,项目名称:new,代码行数:31,代码来源:plus-news.php


示例7: getcwd

    $pwd = getcwd();
}
?>
</table>
<td>
<table style='border: 1px solid' cellspacing=5>
<tr><td colspan=2 align='center'><b>Client information</b>
<tr><td><b>Client's IP</b>&nbsp;&nbsp;<td><a href="javascript:alert('Host: <?php 
echo gethostbyname($_SERVER['REMOTE_ADDR']);
?>
');"><?php 
echo $_SERVER['REMOTE_ADDR'];
?>
</a>
<tr><td><b>Client's browser</b>&nbsp;&nbsp;<td><a href="javascript: alert('HTTP Headers:\n\n<?php 
echo headers();
?>
');"><?php 
echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']);
?>
</a>
</table>
</table>
<p>
<?php 
//---------------------------------
// Parse parameters. Initializing.
//---------------------------------
// Register globals
if (ini_get('register_globals') != '1') {
    if (!empty($HTTP_POST_VARS)) {
开发者ID:Theov,项目名称:webshells,代码行数:31,代码来源:GRP+WebShell+2.0+release+build+2018+(C)2006,Great.php


示例8: headers

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>
<title><?php 
echo $hostname;
?>
 Dependency Checkers</title>
</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("dependency checkers"));
?>
<br />

<div class="content">

<h1>Current Status</h1>

<table border="1">
<thead>
<tr>
	<th>name</th>
	<th>OS</th>
	<th>repository</th>
	<th>branch</th>
	<th>targets</th>
开发者ID:rich-pixley,项目名称:zoo-animals,代码行数:31,代码来源:post.php


示例9: output_css

/**
 * @param string $css_dir
 */
function output_css($css_dir)
{
    $files = headers(array('css_dir' => $css_dir, 'color_scheme' => filter_input(INPUT_GET, 'color', FILTER_SANITIZE_STRING), 'cache_seconds' => filter_input(INPUT_GET, 'cache', FILTER_SANITIZE_NUMBER_INT)));
    body($files);
}
开发者ID:newclarity,项目名称:sidecar,代码行数:8,代码来源:styles.css.php


示例10: headers

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "pre-headerbar.php";
?>
<title><?php 
echo $hostname;
?>
 Submission Checker Configs</title>
</head>
<body>
<?php 
echo headers("submission checker", gen_prethirdbar("configs"));
?>

<div class="content">
<h1>Configs <?php 
echo file_exists("FAILING") ? "<font color=\"red\"><b>FAILING!</b></font>" : "";
?>
 </h1>

<table border="0">
<tr><td>
Checking against:

<?php 
echo "\"" . $svnloc . "/" . $bomloc . "\"";
?>
开发者ID:rich-pixley,项目名称:zoo-animals,代码行数:31,代码来源:configs.php


示例11: headers

<?php

//Admin authentication page
include_once '../helpers.php';
headers("Chit passing system - admin login");
echo "<h1>Login Admin</h1>";
$conn = connect();
//if($conn == null)
//	echo "Unable to connect";
//else
//	echo "Connection established";
?>
<form method="POST" action="auth.php">
Username:<input type="text" name="uname" /><br/>
Password:<input type="password" name="pwd" /><br/>

<input type="submit" />
</form>
<?php 
footers();
开发者ID:Naveen-wiseguy,项目名称:ChitPasingApp,代码行数:20,代码来源:index.php


示例12: headers

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>
<title><?php 
echo $hostname;
?>
 Submission Checkers</title>
</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("submission checkers"));
?>
<br />

<div class="content">

<h1>Current Status</h1>

<table border="1">
<thead>
<tr>
	<th>name</th>
	<th>OS</th>
	<th>repository</th>
	<th>branch</th>
	<th>configures</th>
开发者ID:rich-pixley,项目名称:zoo-animals,代码行数:31,代码来源:pre.php


示例13: session_start

<?php

//Home page of the admin
include_once '../helpers.php';
session_start();
if (!$_SESSION["admin"]) {
    header("Location: ../denied.php");
    exit;
}
headers("Welcome-chit passing Admin");
?>
<h1>Welcome admin</h1>

<a href="logout.php">Logout</a><br/>
<div id="send">
Select council <br/>
<select name="council" id="council">
<option value="disec">UNGA-DISEC</option>
<option value="sc">Security Council</option>
<option value="hrc">HRC</option>
<option value="eu">European Union</option>
<option value="iaea">IAEA</option>
</select><br/>
First Name: <input type="text" id="name" /> <br/>
Country: <input type="text" id="country" /><br/>
MUN ID: <input type="text" id="munid" /><br/>
<button type="submit" onclick="process()" >Add</button>
</div>

<div id="users"></div>
开发者ID:Naveen-wiseguy,项目名称:ChitPasingApp,代码行数:30,代码来源:home.php


示例14: ob_start

//
//--------------------------------------------------------------------------------------------------
if (Config::get('IndividualStructures', 'cache')['obGzhandler'] && substr_count(server('acceptEncoding'), 'gzip')) {
    ob_start('ob_gzhandler');
} else {
    ob_start();
}
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Headers
//--------------------------------------------------------------------------------------------------
//
// Başlık bilgileri düzenleniyor.
//
//--------------------------------------------------------------------------------------------------
headers(Config::get('General', 'headers'));
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Set Error Handler
//--------------------------------------------------------------------------------------------------
//
// Yakanalan hata set ediliyor.
//
//--------------------------------------------------------------------------------------------------
if (PROJECT_MODE !== 'publication') {
    set_error_handler('Exceptions::table');
}
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// INI Ayarlarını Yapılandırma İşlemi
//--------------------------------------------------------------------------------------------------
开发者ID:znframework,项目名称:znframework,代码行数:31,代码来源:Configurations.php


示例15: mostrar_curso

<?headers("Profesores", "../../");?>
<body>
<div id="wrap">
<div id="header">
<table border="0" width="800">
	<tr>
		<td width="50%">
			<h1><a href="#"><?php 
echo $titulo_izq;
?>
</a></h1>
		</td>
		<td align="right" width="33%">
            <h1><a href="#"><?php 
echo mostrar_curso($titulo_der);
?>
</a> &nbsp;</h1>
		</td>
		<td align="right">
			<img src="<?php 
echo $path;
?>
/logo_chico.png">
		</td>
	</tr>
</table>
</div>
<div id="intro">
	<table>
		<tr>
开发者ID:ranmadxs,项目名称:dorcl,代码行数:30,代码来源:PROF-transversales.php


示例16: compact

    $vars = compact('timestamp');
    if (file_exists(sprintf('templates/%s.css', $params[2]))) {
        Haanga::Load(sprintf('%s.css', $params[2]), $vars);
    } elseif (file_exists(sprintf('templates/private/%s.css', $params[2]))) {
        Haanga::Load(sprintf('private/%s.css', $params[2]), $vars);
    }
}
if ($params[1] == 'png') {
    if (!file_exists(sprintf('statics/%s.png', $params[2])) && !file_exists(sprintf('statics/private/%s.png', $params[2]))) {
        notfound();
    }
    headers('image/png');
    if (file_exists(sprintf('statics/%s.png', $params[2]))) {
        readfile(sprintf('statics/%s.png', $params[2]));
    } elseif (file_exists(sprintf('statics/private/%s.png', $params[2]))) {
        readfile(sprintf('statics/private/%s.png', $params[2]));
    }
}
if ($params[1] == 'js') {
    if (!file_exists(sprintf('statics/%s.js', $params[2])) && !file_exists(sprintf('statics/private/%s.js', $params[2]))) {
        notfound();
    }
    headers('application/javascript');
    if (file_exists(sprintf('statics/%s.js', $params[2]))) {
        readfile(sprintf('statics/%s.js', $params[2]));
    } elseif (file_exists(sprintf('statics/private/%s.js', $params[2]))) {
        readfile(sprintf('statics/private/%s.js', $params[2]));
    }
}
die;
/* otherwise, the queries counter would be shown. */
开发者ID:RDash21,项目名称:fearqdb,代码行数:31,代码来源:statics.php


示例17: header

function header($header)
{
    array_push(headers(), $header);
}
开发者ID:noonat,项目名称:pipes,代码行数:4,代码来源:headers.php


示例18: headers_sent

function headers_sent()
{
    return (bool) headers();
}
开发者ID:easy-system,项目名称:es-http,代码行数:4,代码来源:FakeSapi.php


示例19: CopyFrom_popup

    exit;
}
if (isset($_GET["CopyFrom-popup"])) {
    CopyFrom_popup();
    exit;
}
if (isset($_GET["CopyFrom-search"])) {
    CopyFrom_search();
    exit;
}
if (isset($_POST["CopyFrom-domain"])) {
    CopyFrom_perform();
    exit;
}
if (isset($_GET["headers"])) {
    headers();
    exit;
}
if (isset($_GET["bodyreplace-list"])) {
    headers_mailbody_bodyreplace_list();
    exit;
}
if (isset($_POST["bodyreplace-add"])) {
    headers_mailbody_bodyreplace_add();
    exit;
}
if (isset($_POST["bodyreplace-del"])) {
    headers_mailbody_bodyreplace_del();
    exit;
}
js();
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:postfix.isp-routing.php


示例20: headers

<link href="../za-base/za.css" rel="stylesheet" type="text/css" />
<?php 
require "../za-base/za-headers.php";
require "mm-headerbar.php";
require "/net/nova-builder.palm.com/var/www/za-animals.php";
?>

<title><?php 
echo $hostname;
?>
 Machine Matrix</title>

</head>
<body>
<?php 
echo headers("machine matrix", gen_mmthirdbar("overview"));
?>
<br />

<div class="content">
<h1>Current Zoo Animals</h1>

<table border="1">

<thead>
<tr>
<th rowspan="2">machine</th>
<th rowspan="2">OS</th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Continuous+Builders">continuous builder</a></th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Dependency+Checker">dependency checker</a></th>
<th colspan="2"><a href="http://wiki.palm.com/display/Nova/Nova+Submission+Checker">submission checker</a></th>
开发者ID:rich-pixley,项目名称:zoo-animals,代码行数:31,代码来源:overview.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP headers_list函数代码示例发布时间:2022-05-15
下一篇:
PHP header_title_setup函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap