README 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. =============================================================================
  2. Krumo
  3. version 0.2.1a
  4. =============================================================================
  5. You probably got this package from...
  6. http://www.sourceforge.net/projects/krumo/
  7. If there is no licence agreement with this package please download
  8. a version from the location above. You must read and accept that
  9. licence to use this software. The file is titled simply LICENSE.
  10. OVERVIEW
  11. ------------------------------------------------------------------------------
  12. To put it simply, Krumo is a replacement for print_r() and var_dump(). By
  13. definition Krumo is a debugging tool (for PHP5), which displays structured
  14. information about any PHP variable.
  15. A lot of developers use print_r() and var_dump() in the means of debugging
  16. tools. Although they were intended to present human readble information about a
  17. variable, we can all agree that in general they are not. Krumo is an
  18. alternative: it does the same job, but it presents the information beautified
  19. using CSS and DHTML.
  20. EXAMPLES
  21. ------------------------------------------------------------------------------
  22. Here's a basic example, which will return a report on the array variable passed
  23. as argument to it:
  24. krumo(array('a1'=> 'A1', 3, 'red'));
  25. You can dump simultaneously more then one variable - here's another example:
  26. krumo($_SERVER, $_REQUEST);
  27. You probably saw from the examples above that some of the nodes are expandable,
  28. so if you want to inspect the nested information, click on them and they will
  29. expand; if you do not need that information shown simply click again on it to
  30. collapse it. Here's an example to test this:
  31. $x1->x2->x3->x4->x5->x6->x7->x8->x9 = 'X10';
  32. krumo($x1);
  33. The krumo() is the only standalone function from the package, and this is
  34. because basic dumps about variables (like print_r() or var_dump()) are the most
  35. common tasks such functionality is used for. The rest of the functionality can
  36. be called using static calls to the Krumo class. Here are several more examples:
  37. // print a debug backgrace
  38. krumo::backtrace();
  39. // print all the included(or required) files
  40. krumo::includes();
  41. // print all the included functions
  42. krumo::functions();
  43. // print all the declared classes
  44. krumo::classes();
  45. // print all the defined constants
  46. krumo::defines();
  47. ... and so on, etc.
  48. A full PHPDocumenter API documentation exists both in this package and at the
  49. project's website.
  50. INSTALL
  51. ------------------------------------------------------------------------------
  52. Read the INSTALL file.
  53. DOCUMENTATION
  54. ------------------------------------------------------------------------------
  55. As I said, a full PHPDocumenter API documentation can be found both in this
  56. package and at the project's website.
  57. SKINS
  58. ------------------------------------------------------------------------------
  59. There are several skins pre-installed with this package, but if you wish you can
  60. create skins of your own. The skins are simply CSS files that are prepended to
  61. the result that Krumo prints. If you want to use images in your CSS (for
  62. background, list-style, etc), you have to put "%URL%" in front of the image URL
  63. in order hook it up to the skin folder and make the image web-accessible.
  64. Here's an example:
  65. ul.krumo-first {background: url(%url%bg.gif);}
  66. TODO
  67. ------------------------------------------------------------------------------
  68. You can find the list of stuff that is going to be added to this project in the
  69. TODO file from this very package.
  70. CONTRIBUTION
  71. -----------------------------------------------------------------------------
  72. If you download and use and possibly even extend this tool, please let us know.
  73. Any feedback, even bad, is always welcome and your suggestions are going to be
  74. considered for our next release. Please use our SourceForge page for that:
  75. http://www.sourceforge.net/projects/krumo/