PHPでtry~catch文
2014/07/02
PHPでもあるってのを知らなかったのでメモ。
■参考サイト
http://www.php-ref.com/basic/06_try_catch.html
<?
try {
//例外処理
} catch (Exception $e) {
echo $e->getMessage();
}
?>
関連記事
-
-
CodeIgniter4&Bootstrap&jQueryで簡易版お問い合わせページの作成
CodeIgniter4.4.4&Bootstrap&jQuer ...
-
-
数値を3桁とかでカンマ区切りにする
見たこと無い関数が業務中にあったのでメモ。 number_format ■参考サ ...
-
-
PHPで「Warning: date(): It is not safe to…」エラーの対応方法
PHPでdate関数を使った際に「Warning: date(): It is ...
-
-
DTIのVPSにCodeigniter3を導入する方法
DTIのVPSにPHPフレームワークのCodeigniter3系をインストールし ...
-
-
PHPにて「hashids(Sqids)」ライブラリで数値からユニークなランダム英数字のIDに変換する方法
PHPにてユーザID等を推測されないよう数値のIDからユニークなランダム英数字の ...