勉強したことのメモ

Webエンジニア / プログラマが勉強したことのメモ。

PHPでtry~catch文

   2014/07/02  PHP

PHPでもあるってのを知らなかったのでメモ。

■参考サイト
http://www.php-ref.com/basic/06_try_catch.html

<?
try {
//例外処理
} catch (Exception $e) {
echo $e->getMessage();
}
?>

 - PHP

  関連記事

MySQLで重複を除く

ユニークな値を取り出したいときに使う。 DISTINCT(ディスティンクト) S ...

PHPにてSession発行時に保存されるCookieに対してHttpOnly / Secure属性を設定する方法

先日PHPのsetcookie実行時にHttpOnly / Secure属性を設 ...

PHPでmysqli関数使用時のプリペアドステートメントの利用方法

PHPでMySQLを扱う際はmysqli関数を、エスケープの際はreal_esc ...

PHP8系で「Uncaught TypeError: Unsupported operand types」エラー対応方法

PHP8系で「Fatal error: Uncaught TypeError: ...

PHP8系で「Warning: Constant xxxxx already defined in」エラーの対応方法

PHP8系&WordPress6.4.3で「Warning: Const ...