My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
quickmanualen  
Quick Maunaul
Featured
Updated Aug 9, 2011 by akihito....@gmail.com

Panda Quick Maunaul

  1. Unzip
  2. Place web files.
  3. Edit ini file
  4. Test
  5. Use in your own project.
  6. Debug utility

Unzip

Put Panda-folder under include_path (or any other place)

Place web files

be public for 'Panda/htdocs/panda folder' and testing folder (panda_sample)

  • ex) In case of /var/www/localhost/htdocs is web public area, place panda in /user/share/panda
  • $ cd /var/www/localhost/htdocs;
    $ ln -s /user/share/panda/Panda/htdocs/__panda .
    $ ln -s /user/share/panda/Panda/htdocs/panda_sample .

Edit ini file

  1. set $pandaPath as panda folder path.
  2. edit /user/share/panda/Panda/htdocs/panda_sample/panda_ini.php

These config is important.

Panda::CONFIG_DEBUG (bool) debug  mode ?
Panda::CONFIG_VALID_PATH (array) set your project path in array
Panda::CONFIG_LOG_PATH (string) writtable log folder path

Testing

access /panda_sample/ to see error.

  • Panda error (with CSS) will show.
  • trace link works
  • notice and strict error was shown in fireBug console with firePHP

If you confirm everything above, it is OK.

Use in your own project

  1. include panda_ini.php
  2. set debug mode with Panda::CONFIG_DEBUG
  3. Include panda_ini.php after set_error_handler() if you use some framework. Otherwise first line or after require PEAR.php is OK in most cases.
require '/path/to/panda_ini.php';

Debug utity function

p — Prints human-readable information about a variable with print location and variable name

mixed p( mixed $mixed [, string $format = 'dump' ] );

p($mixed);
p($mixed, 'printa');  // a print_a (css table)
p($mixed, 'var');     // v var_dump format
p($mixed, 'export');  // e var_export formaty
p($mixed, 'fire');    // f firePHP format
p($mixed, 'syslog');  // s syslog formart
p($mixed, 'header');  // h header formart

this is alternative of print_r()

t - prints backtrace link

void t( void);

t();

this is alternative of debug_print_backtrace(),


Sign in to add a comment
Powered by Google Project Hosting