hook_exit
hooks/core.php, line 483
- Versions
- hooks
hook_exit($destination = NULL)
Perform cleanup tasks.
This hook is run at the end of each page request. It is often used for page logging and printing out debugging information.
Only use this hook if your code must run even for cached page views. If you have code which must run once on all non cached pages, use hook_init instead. Thats the usual case. If you implement this hook and see an error like 'Call to undefined function', it is likely that you are depending on the presence of a module which has not been loaded yet. It is not loaded because Drupal is still in bootstrap mode.
Parameters
$destination If this hook is invoked as part of a drupal_goto() call, then this argument will be a fully-qualified URL that is the destination of the redirect. Modules may use this to react appropriately; for example, nothing should be output in this case, because PHP will then throw a "headers cannot be modified" error when attempting the redirection.
Valor de retorno
None.
Código
<?php
function hook_exit($destination = NULL) {
db_query('UPDATE {counter} SET hits = hits + 1 WHERE type = 1');
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día