Created
February 6, 2016 12:47
-
-
Save gh640/114e4fff6f5dbe2e08bb to your computer and use it in GitHub Desktop.
PHP: エラーハンドラを whoops に差し替える auto_prepend_file ファイル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * すべての PHP プロセスの前に whoops を呼び出す | |
| * | |
| * php.ini 内で次のようにセットされています | |
| * auto_prepend_file = "/path/to/set_whoops.php" | |
| * | |
| * セットアップ手順: | |
| * 1. whoops をインストール `$ composer global require 'filp/whoops'` | |
| * 2. 本ファイルを作成 | |
| * 3. php.ini に auto_prepend_file の行を追加 | |
| * | |
| * @see https://filp.github.io/whoops/ | |
| */ | |
| require_once '/path/to/composer/vendor/autoload.php'; | |
| $whoops = new \Whoops\Run; | |
| $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); | |
| $whoops->register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment