mb_regex_encoding(‘SJIS’);
PEARが使えるようにする
$path=realpath(dirname( __FILE__));
//PEARが使えるようにする
$pear_path .= “$path/lib/” . ini_get(‘include_path’);
ini_set(‘include_path’, $pear_path);
PHP:ユーザエージェント(useragent)で振り分け
$UA = $_SERVER[‘HTTP_USER_AGENT’];
if (substr_count($UA,”DoCoMo”)) {
} else if (substr_count($UA,”SoftBank”)) {
} else if (substr_count($UA,”vodafone”)) {
} else if (substr_count($UA,”J-PHONE”)) {
} else if (substr_count($UA,”UP.Browser”)) {
}