drupal_set_header

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

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

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

Set an HTTP response header for the current page.

Note: when sending a Content-Type header, always include a 'charset' type too. This is necessary to avoid security bugs (e.g. UTF-7 XSS).

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

aggregator_page_opml in modules/aggregator/aggregator.module
Коллбэк меню; генерирует представление OPML из всех фидов.
aggregator_page_rss in modules/aggregator/aggregator.module
Коллбэк меню. Генерирует фид из материалов аггергатора или категорий в формате RSS 0.92.
blogapi_rsd in modules/blogapi/blogapi.module
db_connect in includes/database.mysql.inc
Инициализирует соединение с базой данных.
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_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_install_page in includes/theme.inc
theme_maintenance_page in includes/theme.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);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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