Krumo: 簡單好用的PHP Debug工具

November 18 , 2009 In: PHP

寫程式最討厭的是程式發生錯誤,但是卻又不知道該從何debug起,我們通常會使用print_r 或者 var_dump 或者是 echo 慢慢的debug。如果你跟阿維一樣使用PHP 5開發,現在可以使用Krumo這個簡單好用的工具幫助我們做這件事情。

雖然IDE也有內建的debug工具,但是並不是每個人都使用IDE來進行PHP的開發,這時候Krumo就可以大展身手,即使使用IDE來開發,阿維相信Krumo也可以幫忙我們節省不少時間。但是由於Krumo只支援PHP 5,所以使用PHP 4的朋友只好說聲抱歉,或者是將PHP升級到5。

當我們下載Krumo之後,只需要將Krumo的路徑設定在INCLUDE_PATH或者是將完整路徑寫在class.krumo.php裡面,Krumo是使用CSS和樹狀目錄來顯示debug訊息,所以在krumo.ini這個設定檔裡面我們可以選擇我們想要使用的skin,debug工具也有skin可以選?沒錯,你沒有看錯,真的是這樣。

使用Krumo的方法

// print a debug backgrace

krumo::backtrace();

// print all the included(or required) files

krumo::includes();

// print all the included functions

krumo::functions();

// print all the declared classes

krumo::classes();

// print all the defined constants

krumo::defines();

此外我們也可以動態的開啟或關閉Krumo

// disable Krumo

krumo::disable();

// Krumo is disabled, nothing is printed

krumo::includes();

// enable Krumo

krumo::enable();

// Krumo is enable, printing is OK

krumo::classes();

Krumo 的debug畫面

Krumo Dedug Tool
1. Krumo 官方網站

2.  Krumo Document

3.  更多關於Krumo範例

AJAX Sample – Others

October 19 , 2009 In: AJAX, ASP.NET, JavaScript, PHP, Prototype, Sample, jQuery
  1. New WordPress Plugin: WDP AJAX Comments
  2. Ajax and XML: Ajax for tables
  3. Introducing the ASP.NET Ajax Frameworks
  4. Ajax and XML: Ajax for chat
  5. How To Create An Amazing jQuery Style Switcher
  6. An Introduction to the Raphael JS Library
  7. Creating a Dynamic Poll with jQuery and PHP
  8. RSS Ajax JavaScript ticker
  9. Create a Dynamic Scrolling Content Box Using AJAX
  10. Create a shoutbox using PHP and AJAX (with jQuery)
  11. Building your first Ajax application with PHP
  12. Vista-like Ajax Calendar version 2
  13. Create an In-Place Editing System
  14. How to Code a Fun To-Do List With PHP and AJAX
  15. AJAX Multiple File Upload Form Using jQuery
  16. 8 Ajax Data Controls and Effects to Work with Tables
  17. Making an Ajax PHP Watermarker Script
  18. Use jQuery and ASP.NET AJAX to build a client side Repeater
  19. Ajax for Java developers: Build dynamic Java applications
  20. Easily build powerful client-side AJAX paging, using jQuery
  21. Using the Prototype JavaScript library and script.aculo.us
  22. Ajax security tools
  23. PHP components: Autosuggest
  24. Creating An Amazing jQuery Style Switcher with Ajax Techniques
  25. Google AJAX APIs
  26. AutoCompleter Tutorial – jQuery(Ajax)/PHP/MySQL
  27. Mastering Ajax, Part 3: Advanced requests and responses in Ajax
  28. Easy Ajax with jQuery

AJAX Sample – 表單驗證

October 19 , 2009 In: AJAX, JSON, JavaScript, Sample, jQuery
  1. Animate validation feedback using jQuery
  2. How to Interact with HTML Forms – woorkup.com
  3. Ajax Username Availability Checker Using MooTools 1.2
  4. How To Build Quick and Simple AJAX Forms with JSON Responses
  5. Auto-populating Select Boxes using jQuery & AJAX
  6. Using Ajax to Validate Forms

IPEVO 線上資訊展


    貼紙語法

    直接將貼紙語法複製並且貼到自己的部落格上就可以進行串聯

    貼紙語法

    直接將貼紙語法複製並且貼到自己的部落格上就可以進行串聯

    貼紙語法

    直接將貼紙語法複製並且貼到自己的部落格上就可以進行串聯

實驗室夥伴

實驗室標籤