2004-08-04 ========== PHP - apache_request_headers() ------------------------------ Reference URI: http://lowreal.net/logs/2004/08/04/2 Written Time: 2004-08-04T02:19:50+09:00 Tags: prog PHP (PHP: Hypertext Preprocessor) で If-Modified-Since を取得したい。apache_request_headers() を使うみたいだけど、関数名に apache とついてる通り Apache モジュールとして動いて いないとこの関数は使えない。自分はローカルテストするとき AnHTTPD+CGI (Common Gateway Interface) 版PHP (PHP: Hypertext Preprocessor) なので普通のコーディングしてテストしようとするとエラーがでる。こりゃどうすりゃい いやら。環境変数には If-Modified-Since とか入ってないような……? CGI (Common Gateway Interface) だと HTTP (Hyper Text Transfer Protocol) ヘッダが取得できないなんて話はないだろうし……わかんねー とりあえず普通の CGI (Common Gateway Interface) と同じように $_SERVER["HTTP_IF_MODIFIED_SINCE"] のようにしてみる…… AnHTTPD が環境変数渡してないってこともありえないこともない……? header("HTTP/1.1 304 Not Modified"); では OK だけど header("Status: 304 Not Modified"); ではダメだった……何故だ。他のとこでステータスコード送るときは大丈夫っぽいのにな ぁ。 関係ないけど lftp ってファイルサイズ見てるんだなぁ? ファイルサイズ変えないとアッ プロードしてくれない。 I want to get If-Modified-Since header on PHP (PHP: Hypertext Preprocessor) . Though one use apache_request_headers() usually, as include `apache' in function name this is only used in mod_php. I us e AnHTTPD + CGI (Common Gateway Interface) PHP (PHP: Hypertext Preprocessor) on localhost, so no function error always happen. How can I do? Environment vari able does not have If-Modified-Since or something like that in it?