0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHPのエラー表示設定

0
Last updated at Posted at 2020-06-12

PHPでの開発時に、ページを更新したら画面が表示されないときに使うコードです。

// 1でエラー表示 0で非表示
ini_set('display_errors', 1);

php.net

ini_set ( string $varname , string $newvalue ) : string

エラーがある場合、エラーを非表示にするとコンソールに500 (Internal Server Error)が返り、
該当ページは表示されません。

その為、初めのうちは画面を更新したら真っ白で何も表示されない!と焦ってしまいました。

php.iniを触らなくても、上記コードでエラーを確認しながら開発を進めることができます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?