<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xml.xsl" type="text/xsl"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>nulog, NULL::something : out of the headphone &gt; 2004 &gt; August &gt; 04 &gt; PHP - apache_request_headers()</title>
  <link href="http://lowreal.net/logs/2004/08/04/2"/>
  <icon>http://lowreal.net/img/banner.png</icon>
  <link rel="self" type="application/atom+xml" href="http://lowreal.net/logs/2004/08/04/2.atom"/>
  <link rel="alternate" type="application/xhtml+xml" href="http://lowreal.net/logs/2004/08/04/2.xhtml"/>
  <updated>2004-08-04T02:19:50+09:00</updated>
  <author>
    <name>cho45(砂糖)</name>
  </author>
  <id>http://lowreal.net/2004/08/04/2</id>
  <entry>
    <title>PHP - apache_request_headers()</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2004/08/04/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2004/08/04/2.xhtml"/>
    <updated>2004-08-04T02:19:50+09:00</updated>
    <published>2004-08-04T02:19:50+09:00</published>
    <id>http://lowreal.net/2004/08/04/2</id>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="PHP: Hypertext Preprocessor">PHP</abbr> で If-Modified-Since を取得したい。<code>apache_request_headers()</code> を使うみたいだけど、関数名に apache とついてる通り Apache モジュールとして動いていないとこの関数は使えない。自分はローカルテストするとき AnHTTPD+<abbr title="Common Gateway Interface">CGI</abbr>版<abbr title="PHP: Hypertext Preprocessor">PHP</abbr> なので普通のコーディングしてテストしようとするとエラーがでる。こりゃどうすりゃいいやら。環境変数には If-Modified-Since とか入ってないような……？　<abbr title="Common Gateway Interface">CGI</abbr> だと <abbr title="Hyper Text Transfer Protocol">HTTP</abbr> ヘッダが取得できないなんて話はないだろうし……わかんねー</p>
        <ins datetime="2004-08-04T02:53:22+09:00">
          <p>とりあえず普通の <abbr title="Common Gateway Interface">CGI</abbr> と同じように <code> $_SERVER["HTTP_IF_MODIFIED_SINCE"]</code> のようにしてみる……</p>
          <p>
            <del datetime="2004-08-04T03:10:15+09:00" title="Apache でも入ってない">AnHTTPD が環境変数渡してないってこともありえないこともない……？</del>
          </p>
        </ins>
        <ins datetime="2004-08-04T03:02:56+09:00">
          <p><code>header("HTTP/1.1 304 Not Modified");</code> では OK だけど <code>header("Status: 304 Not Modified");</code> ではダメだった……何故だ。他のとこでステータスコード送るときは大丈夫っぽいのになぁ。</p>
        </ins>
        <ins datetime="2004-08-04T03:15:52+09:00">
          <p>関係ないけど lftp ってファイルサイズ見てるんだなぁ？　ファイルサイズ変えないとアップロードしてくれない。</p>
        </ins>
        <p>I want to get If-Modified-Since header on <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>. Though one use <code>apache_request_headers()</code> usually, as include `apache' in function name this is only used in mod_php. I use AnHTTPD + <abbr title="Common Gateway Interface">CGI</abbr><abbr title="PHP: Hypertext Preprocessor">PHP</abbr> on localhost, so no function error always happen. How can I do? Environment variable does not have If-Modified-Since or something like that in it? </p>
      </div>
    </content>
  </entry>
</feed>
