麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 編程 > PHP > 正文

分享PHP header函數使用教程

2020-03-22 20:16:47
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:
?php
// fix 404 pages:
header('HTTP/1.1 200 OK');
// set 404 header:
header('HTTP/1.1 404 Not Found');
// set Moved Permanently header (good for redrictions)
// use with location header
header('HTTP/1.1 301 Moved Permanently');
// redirect to a new location:
header('Location: http://www.example.org/');
// redrict with delay:
header('Refresh: 10; url=http://www.example.org/');
print 'You will be redirected in 10 seconds';
// you could also use the HTML syntax:// meta http-equiv="refresh" content="10;http://www.example.org/ /
// override X-Powered-By: PHP:
header('X-Powered-By: PHP/4.4.0');
header('X-Powered-By: Brain/0.6b');
// content language (en = English)
header('Content-language: en');
// last modified (good for caching)
$time = time() – 60; // or filemtime($fn), etc
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $time).' GMT');
// header for telling the browser that the content
// did not get changed
header('HTTP/1.1 304 Not Modified');
// set content length (good for caching):
header('Content-Length: 1234');
// Headers for an download:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.zip"');
header('Content-Transfer-Encoding: binary');
// load the file to send:readfile('example.zip');
// Disable caching of the html' target='_blank'>current document:
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
// Date in the pastheader('Pragma: no-cache');
// set content type:
header('Content-Type: text/html; charset=iso-8859-1');
header('Content-Type: text/html; charset=utf-8');
header('Content-Type: text/plain');
// plain text file
header('Content-Type: image/jpeg');
// JPG picture
header('Content-Type: application/zip');
// ZIP file
header('Content-Type: application/pdf');
// PDF file
header('Content-Type: audio/mpeg');
// Audio MPEG (MP3,…) file
header('Content-Type: application/x-shockwave-flash');
// Flash animation// show sign in box
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic realm="Top Secret"');
print 'Text that will be displayed if the user hits cancel or ';
print 'enters wrong login data';
?PHP教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 亚洲电影在线播放 | 毛片视频免费播放 | 一区二区三区日本在线观看 | 国产亚洲欧美视频 | 欧美成人一区二区三区电影 | 91情侣在线偷精品国产 | 五月天堂av91久久久 | 精品一区二区三区免费看 | 做爰裸体激情2 | 91九色视频在线播放 | 久久久久久久一区二区 | 国产成年人视频 | 亚洲 综合 欧美 动漫 丝袜图 | 亚洲成人免费影视 | 午夜精品久久久久久中宇 | 在线观看第一区 | 久久国产精品小视频 | 精品一区二区三区网站 | caoporn国产一区二区 | 黄色免费小视频网站 | 911网站大全在线观看 | 美女亚洲综合 | 国产视频软件在线 | 成人免费看毛片 | 亚洲xxx在线观看 | 天堂成人一区二区三区 | 视频在线色 | 在线播放中文 | 91精品国产综合久久久欧美 | 在线亚洲欧美 | 久草在线视频精品 | a视频在线播放 | 青青草成人免费视频在线 | 久久毛片免费 | 小情侣嗯啊哦视频www | 亚洲网站免费观看 | 国产毛片自拍 | 国产欧美日韩视频在线观看 | 欧美一级全黄 | 免费看一级视频 | 在线 日本 制服 中文 欧美 |