* @author yuji TAKAHASHI */ // InputCheck // 文字列前後の空白文字(全・半角とも)削除、タグ対応、半角カナ→全角カナをまとめたものです。 function InputCheck($str, $strLength = 32768) { if (!ereg("^[0-9]+$", $strLength)) { echo "エラー
\n"; exit; } $str = ereg_replace("^ {1,}| {1,}$", "", $str); $str = trim($str); $str = htmlspecialchars($str); $str = mb_convert_kana($str); $str = mb_strcut($str, 0, $strLength); return $str; } ?>