function customerror_header in Customerror 7
Same name and namespace in other branches
- 8 customerror.module \customerror_header()
- 5 customerror.module \customerror_header()
- 6 customerror.module \customerror_header()
Sets the http header depending on the error code (403 or 404).
Parameters
int $code: The error code, either 403 or 404.
1 call to customerror_header()
- customerror_page in ./
customerror.module - Returns the content to display on the the 403 or 404 error page.
File
- ./
customerror.module, line 252 - Enables custom 404 (not found) and 403 (access denied) pages in Drupal.
Code
function customerror_header($code) {
switch ($code) {
case 403:
drupal_add_http_header('Status', '403 Forbidden');
break;
case 404:
drupal_add_http_header('Status', '404 Not Found');
break;
}
}