drupal_set_header

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/common.inc, строка 133

Версии
5 – 6
drupal_set_header($header = NULL)

Установить ответный HTTP-заголовок для текущей страницы.

Важно: при установке заголовка Content-Type обязательно указывайте кодировку ('charset'). Это необходимо по соображениям безопасности (например, UTF-7 XSS).

▾ 14 функции вызывают drupal_set_header()

blogapi_rsd in modules/blogapi/blogapi.module
drupal_access_denied in includes/common.inc
Генерирует ошибку 403 если для просмотра страницы недостаточно прав.
drupal_get_headers in includes/common.inc
Get the HTTP response headers for the current page.
drupal_json in includes/common.inc
Возвращает данные в формате JSON.
drupal_not_found in includes/common.inc
Генерирует ошибку 404 (страница не найдена) если запрос не удалось обработать.
drupal_site_offline in includes/common.inc
Generates a site off-line message.
file_transfer in includes/file.inc
Transfer file using http to client. Pipes a file through Drupal to the client.
node_feed in modules/node/node.module
A generic function for generating RSS feeds from a set of nodes.
theme_aggregator_page_opml in modules/aggregator/aggregator.pages.inc
Темизирует вывод новостной ленты в формате OPML.
theme_aggregator_page_rss in modules/aggregator/aggregator.pages.inc
Темизирует вывод RSS.
theme_install_page in includes/theme.maintenance.inc
Generate a themed installation page.
theme_update_page in includes/theme.maintenance.inc
Generate a themed update page.
_db_error_page in includes/database.inc
Вспомогательная функция для показа фатальных ошибок в базе данных.
_drupal_bootstrap_full in includes/common.inc

Код

<?php
function drupal_set_header($header = NULL) {
  // We use an array to guarantee there are no leading or trailing delimiters.
  // Otherwise, header('') could get called when serving the page later, which
  // ends HTTP headers prematurely on some PHP versions.
  static $stored_headers = array();

  if (strlen($header)) {
    header($header);
    $stored_headers[] = $header;
  }
  return implode("\n", $stored_headers);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему