PHP ¤Î¥Ç¥Ð¥Ã¥°¤¬³Ú¤Ë¤Ê¤ë¡©ÊÑ¿ô¤Î¾ðÊó¤ò¸«¤ä¤¹¤¯É½¼¨¤¹¤ë dBug
http://dbug.ospinto.com/
¥ê¥ó¥¯Àè¤ÎÀâÌÀ¤Ë¤Ï var_dump() ¤ÈÈæ³Ó¤·¤¿¤ß¤¿¤¤¤Ë½ñ¤¤¤Æ¤¢¤ë¤¬¡¤¼ÂºÝ¤Ï print_r() ¤ò¸«¤ä¤¹¤¯¤·¤¿´¶¤¸¡¥
°ÊÁ°¾Ò²ð¤·¤¿ PHP ÍѤΥǥХ尥饤¥Ö¥é¥ê Tulpes PHP4 Debug Helper (debuglib.php) ¤È´ðËÜŪ¤Ë¤ÏƱ¤¸¡¥
³«È¯»þ¤Ë¤Ï¤â¤Ã¤Ñ¤é debuglib.php ¤Î¤ªÀ¤ÏäˤʤäƤ¤¤ë¤¬¡¤dBug ¤â»È¤Ã¤Æ¤ß¤¿¡¥
¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ëÊÑ¿ô¤Î·¿¤Ï
- ÇÛÎó
- ¥¯¥é¥¹/¥ª¥Ö¥¸¥§¥¯¥È
- ¥Ç¡¼¥¿¥Ù¡¼¥¹¥ê¥½¡¼¥¹
- XML ¥ê¥½¡¼¥¹
- ¥¤¥á¡¼¥¸¥ê¥½¡¼¥¹
¼ÂºÝ¤Îɽ¼¨¤Ï¤É¤¦¤Ê¤ë¤«¤È¤¤¤¦¤È
$variable = array(
"first"=>"1",
"second",
"third"=>array(
"inner third 1",
"inner third 2"=>"yeah"),
"fourth");
¤³¤Î¤è¤¦¤ÊÇÛÎ󤬤¢¤Ã¤¿¾ì¹ç
new dBug($variable);
¤³¤Î¤è¤¦¤Ë dBug ¤ò¸Æ¤Ó½Ð¤¹¤È°Ê²¼¤Î¤è¤¦¤Êɽ¼¨¤Ë¤Ê¤ë¡¥
ÊØÍø¤Ê¤Î¤Ï¡¤¾åµ¤Î²èÁü¤Î¾ì¹çÎ理ÎÉôʬ¤äÇö¤¤Î理ÎÉôʬ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¤°Ê²¼¤Î¤è¤¦¤Ë¤½¤ÎÉôʬ¤¬±£¤ì¤ë¤³¤È¡¥
Â礤ÊÇÛÎó¤òɽ¼¨¤·¤Æ¤¤¤ÆÌÜŪ¤ÎÉôʬ¤ò¸«¼º¤¤¤½¤¦¤Ê¤È¤¤Ë¤ÏÊØÍø¡¥
¤Þ¤¿¡¤¥Ç¡¼¥¿¥Ù¡¼¥¹¥ê¥½¡¼¥¹¤¬°·¤¨¤ë¤Î¤âÊØÍø¤Ê¤È¤³¤í¡¥
°Ê²¼¤Ï¡¤mysql_query() ¤ÎÌá¤êÃͤΥ꥽¡¼¥¹·¿¤òɽ¼¨¤·¤¿¤È¤³¤í¡¥
ÂçÎ̤Υǡ¼¥¿¤ò°·¤¦¾ì¹ç¤Ë¤Ï¸þ¤«¤Ê¤¤¤È»×¤¦¤¬¤Á¤ç¤Ã¤È¤·¤¿¥Ç¡¼¥¿¤òɽ¼¨¤·¤¿¤¤¾ì¹ç¤ÏÊØÍø¡¥
¤¿¤À¤·¡¤MySQL ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥ê¥½¡¼¥¹¤·¤«¥Æ¥¹¥È¤·¤Æ¤¤¤Ê¤¤¤è¤¦¤Ç¡¤SQLite ¤Î¥ê¥½¡¼¥¹·¿¤Ïɽ¼¨¤Ç¤¤Ê¤«¤Ã¤¿¡¥
¤Þ¤¿¡¤PEAR::DB ¤ò»È¤Ã¤¿¾ì¹ç¤Ï¤È¤¤¤¦¤È¡¤
<?php
require_once 'DB.php';
require_once 'dBug.php';
define('DSN', 'mysql://userid:passwd@localhost/test');
$dbh = DB::connect(DSN);
$sql = 'SELECT * FROM empinfo';
$result = $dbh->query($sql);
new dBug($result->result);
?>
¤¤Á¤ó¤Èɽ¼¨¤Ç¤¤¿¡¥
¤³¤Îµ»ö¤Ø¤Î¥³¥á¥ó¥È
(¥³¥á¥ó¥È¤Ï¤¢¤ê¤Þ¤»¤ó)