O'Reilly logo

CMS Made Simple Development Cookbook by Samuel Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using debug_display or error_log to see what parameters your module is receiving

Sometimes when developing a module, particularly when dealing with forms, it is useful to dump out the incoming parameters to see exactly what input your module is receiving. This recipe shows a pair of methods for displaying that information: one directly to your web browser, the other to your PHP error log.

How to do it...

  1. Use SSH to connect to your server.
  2. Change your working directory to the News module's directory of your CMS Made Simple installation directory, for example:
    cd /var/www/mysite-root/modules/News
    
  3. Using your favorite editor, edit action.editarticle.php, and immediately after the $gCms test, add a debug statement. The first three lines will look like: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required