本文整理汇总了PHP中drupal_page_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP drupal_page_footer函数的具体用法?PHP drupal_page_footer怎么用?PHP drupal_page_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了drupal_page_footer函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deliverRawHtmlPage
public static function deliverRawHtmlPage($result)
{
if (is_int($result)) {
drupal_deliver_html_page($result);
return;
}
// Emit the correct charset HTTP header, but not if the page callback
// result is NULL, since that likely indicates that it printed something
// in which case, no further headers may be sent, and not if code running
// for this page request has already set the content type header.
if (isset($result) && is_null(drupal_get_http_header('Content-Type'))) {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
}
// Send appropriate HTTP-Header for browsers and search engines.
global $language;
drupal_add_http_header('Content-Language', $language->language);
if (isset($result)) {
print render($result);
}
drupal_page_footer();
}
示例2: drupal_page_header
<?php
// $Id: index.php,v 1.82.4.1 2006/10/18 20:14:08 killes Exp $
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*/
include_once 'includes/bootstrap.inc';
drupal_page_header();
include_once 'includes/common.inc';
fix_gpc_magic();
/*
Disabled by AstBill Team - Uvaraj
Not compatible med AstBill.
Fix to come soon.*/
//drupal_check_token();
$status = menu_execute_active_handler();
switch ($status) {
case MENU_NOT_FOUND:
drupal_not_found();
break;
case MENU_ACCESS_DENIED:
drupal_access_denied();
break;
}
drupal_page_footer();
示例3: pageFooter
/**
* Performs end-of-request tasks.
*
* This function sets the page cache if appropriate, and allows modules to
* react to the closing of the page by calling hook_exit().
*
* This is just a wrapper around drupal_page_footer() so extending classes can
* override this method if necessary.
*
* @see drupal_page_footer().
*/
protected static function pageFooter()
{
drupal_page_footer();
}
示例4: pageFooter
/**
* Performs end-of-request tasks.
*
* This function sets the page cache if appropriate, and allows modules to
* react to the closing of the page by calling hook_exit().
*
* This is just a wrapper around drupal_page_footer() so extending classes can
* override this method if necessary.
*
* @see drupal_page_footer().
*/
public static function pageFooter() {
drupal_page_footer();
}
示例5: deliverFileTransfer
/**
* Delivery callback; transfer the file inline.
*
* @param mixed $file
*/
public static function deliverFileTransfer($file)
{
if (is_int($file)) {
drupal_deliver_html_page($file);
return;
} elseif (!is_object($file) || !is_file($file->uri) || !is_readable($file->uri)) {
drupal_deliver_html_page(MENU_NOT_FOUND);
return;
}
// @todo Figure out if any other headers should be added.
$headers = array('Content-Type' => mime_header_encode($file->filemime), 'Content-Disposition' => 'inline', 'Content-Length' => $file->filesize);
// Let other modules alter the download headers.
//drupal_alter('file_download_headers', $headers, $file);
// Let other modules know the file is being downloaded.
module_invoke_all('file_transfer', $file->uri, $headers);
foreach ($headers as $name => $value) {
drupal_add_http_header($name, $value);
}
$fd = fopen($file->uri, 'rb');
if ($fd !== FALSE) {
while (!feof($fd)) {
print fread($fd, DRUPAL_KILOBYTE);
}
fclose($fd);
} else {
watchdog('favicon', 'Unable to open @uri for reading.', array('@uri' => $file->uri));
drupal_deliver_html_page(MENU_NOT_FOUND);
return;
}
// Perform end-of-request tasks.
if (static::canCacheFile($file)) {
drupal_page_footer();
} else {
drupal_exit();
}
}