Function AfterAppInit is executed in the beginning of each page before any processing takes place. Use this event to override any global PHPRunner variables. See help area in Event editor for the list of available global variables.
Note: It's not recommended to display anything on the web page from this event. This may break your application.
Applies to pages
Lets say you need to troubleshoot your application displaying executed SQL query on the top of the page. Usually you proceed to include/appsettings.php file and set $dDebug variable to true though changing this variable back and forth is a little or no joy.
Using AfterAppInit event you can display debug info simply adding debug=true to the URL.
Sample URL: categories_list.php?debug=true
Database connection is not yet open in this event. If you need to perform any database operations open database connection manually.
Recommended sample events