LoginSignup
0
1

More than 5 years have passed since last update.

PHPでログを出力したい時に。。。

Last updated at Posted at 2017-02-16

配列やオブジェクトを指定した場合はキーと要素を表す形式で値が表示される。

print_r($変数名)

配列の場合は要素数とインデックス番号が表示され、オブジェクトの場合は、オブジェクト内部の変数の数や変数に関する情報が表示される。

var_dump($変数名)

Codeigniterの書き方??かもしれませんが。。。

log_message('debug', 'Hello world');

LogLevel(debug)はの部分には下記のものが使える。
'Hello world'部分に変数を入れることもできる。

error = エラー
debug = デバッグ
info = 情報
0
1
2

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
1