日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

PHP header函数大全

發布時間:2023/12/2 php 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PHP header函数大全 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

PHP header函數大全

header('Content-Type: text/html; charset=utf-8'); header('Location: http://www.php-note.com/');

?

<?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.php-note.com/');// redrict with delay: header('Refresh: 10; url=http://www.php-note.com/'); //print You will be redirected in 10 seconds;// you could also use the HTML syntax:// <meta http-equiv="refresh" content="10;http://www.php-note.com/ />// 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 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');// plain text file header('Content-Type: text/plain');// JPG picture header('Content-Type: image/jpeg');// ZIP file header('Content-Type: application/zip');// PDF file header('Content-Type: application/pdf');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 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml">'; echo '<head>'; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; echo '<meta http-equiv="refresh" content="0;url=' . oppo_sync_logout . '" />'; echo '<title>頁面跳轉中...</title>'; echo '</head>'; echo '<body>'; echo ' <div style="text-align:left;margin-top:10px;">頁面跳轉中...</div>'; echo '</body>'; echo '</html>'; die(); ?>

?

轉載于:https://www.cnblogs.com/blueskycc/p/5364093.html

總結

以上是生活随笔為你收集整理的PHP header函数大全的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。