入口
 HTML/PHP 切替
 環境変数
 配列
 文字コード
 session
買物かご
 index.php
 sub.phl
 引数受取
制御構造
 if
  文字比較
  空文字列
 foreach
文字取扱
 空白文字
  trim()
mail
 mime mail
PostgreSQL
 PostgreSQL 用の関数
 関数名の変更
 単純な表を作成
 記述例
Books

PHP4 programming Apache + PHP4 + PostgreSQL | 日本語説明書
Last Update: "2004/12/06 11:39:53 makoto"

文字コード

/usr/pkg/etc/php.ini に次のような部分がある。
; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS
そのままだと Apache の設定による文字コード情報が送られる
ttyp1:makoto@umax  11:40:53/041206(~)> curl -I http://www.ki.nu/~makoto/php/cart.php
HTTP/1.1 200 OK
Date: Mon, 06 Dec 2004 02:40:59 GMT
Server: Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7d DAV/2 PHP/4.3.9
X-Powered-By: PHP/4.3.9
Set-Cookie: PHPSESSID=ada96b521ec3b4e2759ff0a362c268b0; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=ISO-2022-JP
この画面は Jeedosaquin によって表示しています。
Last Update: Sat, 07 Jun 2014 22:16:17 GMT 1.66 2008/03/08