PHPでtry~catch文
2014/07/02
PHPでもあるってのを知らなかったのでメモ。
■参考サイト
http://www.php-ref.com/basic/06_try_catch.html
<?
try {
//例外処理
} catch (Exception $e) {
echo $e->getMessage();
}
?>
関連記事
-
-
PHPでOGPタグ(metaタグ)を簡単に取得できる「OpenGraph.php」の利用方法
PHPでOGPタグ(metaタグ)を取得する際、file_get_content ...
-
-
PHPでメルマガを配信する方法(BCCで一括送信するパターン)
PHPでメールマガジンを配信したかった。宛先のメールアドレスはMySQLに保存さ ...
-
-
PHP8系で「Warning: Attempt to read property "xxxxxx" 」エラーの対応方法
PHP8系&WordPress6.4.3で「Warning: Attem ...
-
-
PHP7 / 8でBlowfishアルゴリズムを用いた暗号化と復号化方法
大分前にPHPでPearのCrypt_Blowfishパッケージを使用し、Blo ...
-
-
PHPで「operator not supported for strings」エラーの対応方法
PHPにて「Fatal error: [] operator not suppo ...