phpalert

Summary: use popup for debugging
Version: 2.3
Prerequisites: none
Status: Working
Maintainer:
Downloads: phpalert.phpΔ

Questions answered by this recipe

  • Is there a way to use a popup for debugging in php?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

Popup alert box for debugging.

This recipe is intended for administrators to use inside a php program for debugging.

Syntax is just like the javascript alert() function.

 phpalert($somevalue);

 phpalert("hello world");

 phpalert("string");

 phpalert('single quotes ok');

 phpalert("data=$datavar"); - can use php variables inside double quotes

Installing

Copy phpalert.phpΔ to your cookbook directory

In your config.php enter:

include_once("cookbook/phpalert.php");

or in your farmconfig.php enter:

include_once("$FarmD/cookbook/phpalert.php");

Notes

Release Notes

  • Version: 10 10 2006 10:40 AM CST - Initial release
  • Version: 10 18 2006 12:47 PM CST - correct spelling of the work "language" in javascript code
  • Version: 10 18 2006 03:43 PM CST - update javscript code to w3c compliance
  • Version: 10 27 2006 05:12 AM CST - way improved handling of quotes
  • Version: 2.0 - now works with redirects, also added version information to code
  • Version: 2.1 - cleaner code
  • Version: 2.2 - fix version information

Comments

See Also

Contributors

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.