麻辣家族討論版版's Archiver

小誌 發表於 2011-4-19 09:37

5-4 檔頭資訊

[color=DarkRed][b][size=4]5-4   檔頭資訊[/size][/b][/color]
檔頭資訊:網頁文件中被<HEAD>…</HEAD>標籤包括起來的文件資訊,常見的有文件抬頭(被<TITLE>…</TITLE>標籤包括起來)以及文件的類型、所使用的編碼字集等:[code]<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>新增網頁1</title>
</head>
<body>
網頁的顯示內容
</body>
</html>[/code]這些檔頭資訊我們都可以透過PHP的「header()」函數來做輸出:
header()函數格式[code]int header ( string string [, bool replace [, int http_response_code]]) [/code]也就是:[code]header(“網頁資訊名稱: 資訊內容”);[/code]

頁: [1]

麻辣家族討論版版為 麻辣學園 網站成員  由 昱得資訊工作室 © Since 1993 所提供