發新話題

[分享] 《資訊分享》 PHP 手冊 - 函式庫 『Apache特定函式庫』

《資訊分享》 PHP 手冊 - 函式庫 『Apache特定函式庫』

apache_lookup_uri --- 執行URI的部份請求並且傳回所有資訊
apache_lookup_uri

(PHP3 >= 3.0.4 , PHP4)

apache_lookup_uri ---  執行URI的部份請求並且傳回所有資訊

語法 : class apache_lookup_uri (string filename)

說明 :

執行URI局部的請求,獲得所有關於資源的重要資訊,並且將這個資訊放入物件中傳回,所傳回的物件有著下列的屬性 :

status
the_request
status_line
method
content_type
handler
uri
filename
path_info
args
boundary
no_cache
no_local_copy
allowed
send_bodyct
bytes_sent
byterange
clength
unparsed_uri
mtime
request_time

注意 : 當PHP是安裝成Apache模組時,apache_looup_uri( )才會運作


apache_note --- 取得及設定apache請求記錄
apache_note

(PHP3 >= 3.0.2 , PHP4)

apache_note ---  取得及設定apache請求記錄

語法 : string apache_note (string note_name [, string note_value])

說明 :
apache_note( )是個Apache特定函式,可以取得和設定請求的notes表格中的值。如果呼叫此函式時只有一個參數,則它會傳回目前note_name的值,如果有二個參數,則它會設定note_value為note_name的值,並且傳回note_name先前的值。


getallheaders --- 取得所有HTTP請求標頭
getallheaders

(PHP3 , PHP4)

getallheaders ---  取得所有HTTP請求標頭

語法 : array getallheaders (void)

說明 :

此函式傳回現行的請求的所有HTTP標頭,傳回值是一陣列型態。

Example :

<?php

   $headers = getallheaders();

   while (list ($header, $value) = each ($headers)) {

              echo "$header: $value<br>\n";

   }

?>

這個範例將會顯示現行的請求的所有標頭。

注意 : 當PHP是執行在Apache模組時,getallheaders( )才有效


virtual --- 執行Apache次要請求
virtual

(PHP3 , PHP4)

virtual ---  執行Apache次要請求

語法 : int virtual (string filename)

說明 :
virtual( )是Apache特定函式,相當於是mod_include中的<!--#include virtual...-->,它執行一個Apache次要請求(sub_request)。它可以用來包含CGI程式或是.shtml檔案,CGI程式必須產生有效的CGI標頭,最少必須要產生一個Content-type標頭。PHP檔案,你需要使用include( )或是require( ),virtual( )無法用來包含一個它本身是PHP檔案的文件。

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。