当前位置: 首页>>代码示例>>PHP>>正文


PHP doctype函数代码示例

本文整理汇总了PHP中doctype函数的典型用法代码示例。如果您正苦于以下问题:PHP doctype函数的具体用法?PHP doctype怎么用?PHP doctype使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了doctype函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->CI =& get_instance();
     //$this->CI调用框架方法
     $this->CI->load->helper(array('html', 'string', 'url'));
     $this->CI->load->model('tool/spider_model');
     if (!is_cli()) {
         echo doctype('html4-trans') . meta('Content-type', 'text/html;charset=utf-8', 'equiv');
         echo link_tag(base_url('public/image/favicon.ico'), 'shortcut icon', 'image/ico');
     }
 }
开发者ID:ahmatjan,项目名称:lv,代码行数:11,代码来源:Spider_func.php

示例2: index

 public function index()
 {
     $main['doctype'] = doctype('html5');
     $main['html_properties'] = config_item('html_properties');
     $main['title'] = config_item('site_title') . 'Home';
     $main['meta'] = $this->build->meta(_VIEW_DIR_);
     $main['links'] = $this->build->links(_VIEW_DIR_);
     $main['scripts'] = $this->build->scripts(_VIEW_DIR_);
     $body['navigation'] = $this->build->navigation();
     $main['body'] = $this->build->body(_VIEW_DIR_, $body);
     $this->load->view('global_main', $main);
 }
开发者ID:SkullaCode,项目名称:skullaframe,代码行数:12,代码来源:Home.php

示例3: _headers

 /**
  * Sets server headers and doctype
  *
  * Also sets page mime type, based on if sent as
  * html or xhtml, and what the target browser
  * supports
  *
  * @param bool $xhtml
  * @param bool $html5
  * @return Page
  */
 private function _headers($xhtml, $html5)
 {
     $this->CI->output->set_header("Cache-Control: must-revalidate, public");
     $this->CI->output->set_header("Vary: Accept");
     $mime = "";
     //Variable for accept keyword
     $accept = !empty($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : "";
     //Predefine doctype
     $doctype_string = $html5 == TRUE ? doctype('html5') : doctype('xhtml11');
     //Predefine charset
     $charset = "UTF-8";
     //If xhtml flag is false, set html5 header
     if ($xhtml == TRUE) {
         //Check that the user agent accepts application/xhtml+xml, or if it's the W3C Validator
         if (stristr($accept, "application/xhtml+xml") || stristr($_SERVER["HTTP_USER_AGENT"], "W3C_Validator")) {
             $mime = "application/xhtml+xml";
         } else {
             if (stristr($accept, "application/xml")) {
                 $mime = "application/xml";
             } else {
                 if (stristr($accept, "text/xml")) {
                     $mime = "text/xml";
                 } else {
                     $mime = "text/html";
                     if ($html5 == FALSE) {
                         $doctype_string = doctype('html4-strict');
                     }
                 }
             }
         }
     } else {
         $mime = "text/html";
         if ($html5 == FALSE) {
             $doctype_string = doctype('html4-strict');
         }
     }
     // set the doctype according to the mime type which was determined
     if ($mime == "application/xhtml+xml" || $mime == "text/xml" || $mime == "application/xml") {
         if ($html5 == TRUE) {
             $doctype_string = '';
         }
         $doctype_string = "<?xml version='1.0' encoding='{$charset}' ?>\n" . $doctype_string . "\n<html xmlns='http://www.w3.org/1999/xhtml'" . " xml:lang='en'>";
     } else {
         $doctype_string .= "\n<html lang='en'>";
     }
     // finally, output the mime type and prolog type
     $this->CI->output->set_header("Content-Type: {$mime};charset={$charset}");
     $this->CI->output->set_header("X-UA-Compatible: chrome=1, IE=edge");
     $this->CI->output->set_output($doctype_string);
     return $this;
 }
开发者ID:juniorhq88,项目名称:Codeigniter-Page-Builder,代码行数:62,代码来源:Page.php

示例4: doctype

<?php

include_once '../include.php';
doctype();
//<title>Monster constructor</title>
$path = pathinfo($_SERVER['SCRIPT_NAME']);
$folder = $path['dirname'] . '/';
$filename = $path['basename'];
?>
<html>
<head>
	<?php 
head();
?>
	
	<link href="/_files/css/white.css" rel="stylesheet" />

<style>
	.draggable {
		 cursor:move;
	 }
	.draggable:hover {
		background:transparent url(_img/bg_20_mid_grey.png) top left repeat;
		border-radius:3px;
	}
	.resizable {}
	.img-wrap {
		display: inline-block;
	}
	.img-wrap .ui-resizable-handle {
		display: none !important;
开发者ID:webvitalii,项目名称:web-services,代码行数:31,代码来源:index.php

示例5: render

 /**
  * Render
  *
  * This function is for the template system,
  * it takes all the templates and renders
  * them to the browser.
  *
  * @author Chris Baines
  * @since 0.0.1
  */
 public function render($page_data = array(), $page_title, $page_template)
 {
     // See if any reports exist.
     $reports = $this->reports->count_by('zapped', NULL);
     // Build the template data array.
     $data = array('navigation' => array('links' => array(array('link' => anchor(site_url('dashboard/categories'), lang('lnk_categories'))), array('link' => anchor(site_url('dashboard/all_users'), lang('lnk_users'))), array('link' => anchor(site_url('dashboard/all_groups'), lang('lnk_groups'))), array('link' => anchor(site_url('dashboard/settings'), lang('lnk_settings'))), array('link' => anchor(site_url('dashboard/achievements'), lang('lnk_achievements')))), 'logo' => anchor(site_url(), $this->site_name, array('class' => 'navbar-brand')), 'username' => ucfirst($this->session->userdata('username')), 'logout_link' => anchor(site_url('users/logout'), lang('lnk_logout')), 'home_link' => anchor(site_url('forums'), lang('lnk_visit_site'))), 'sidebar' => array('all_users' => anchor(site_url('dashboard/all_users'), lang('lnk_users')), 'add_user' => anchor(site_url('dashboard/add_user'), lang('lnk_add_user')), 'categories' => anchor(site_url('dashboard/categories'), lang('lnk_categories')), 'reports' => empty($reports) ? anchor(site_url('dashboard/reports'), lang('lnk_reports')) : anchor(site_url('dashboard/reports'), '' . lang('lnk_reports') . ' <span class="pull-right label label-danger">' . $reports . '</span>'), 'all_groups' => anchor(site_url('dashboard/all_groups'), lang('lnk_groups')), 'add_group' => anchor(site_url('dashboard/add_group'), lang('lnk_add_group')), 'all_settings' => anchor(site_url('dashboard/settings'), lang('lnk_settings')), 'language_packs' => anchor(site_url('dashboard/language'), lang('lnk_language_packs')), 'achievements' => anchor(site_url('dashboard/achievements'), lang('lnk_achievements')), 'achievement_triggers' => anchor(site_url('dashboard/achievement_triggers'), lang('lnk_achievement_triggers')), 'permissions' => anchor(site_url('dashboard/permissions'), lang('lnk_permissions')), 'themes' => anchor(site_url('dashboard/themes'), lang('lnk_themes'))), 'footer' => array('copy_text' => 'Powered By ' . anchor('http://www.doveforums.com', 'Dove Forums') . ', &copy; 2011 - 2015.'));
     // Define the template regions.
     $data['templates'] = array('doctype' => doctype('html5'), 'theme' => $this->admin_theme->name !== 'default' ? '<link href="' . $this->admin_theme->url . '" rel="stylesheet">' : '', 'css' => array(array('link' => '<link href="' . base_url('themes/default/css/custom.css') . '" rel="stylesheet">'), array('link' => '<link href="' . base_url('themes/default/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') . '" rel="stylesheet" type="text/css" />')), 'meta' => array(array('meta' => meta('keywords', $this->config->item('keywords')))), 'js' => array(array('script' => '<script src="' . base_url('themes/default/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') . '" type="text/javascript"></script>'), array('script' => '<script src="' . base_url('themes/default/js/forums.js') . '"></script>')), 'title' => '' . $this->site_name . ' - ' . $page_title . '', 'navigation' => $this->parser->parse('default/sections/admin_navigation', element('navigation', $data), TRUE), 'sidebar' => $this->parser->parse('default/sections/admin_sidebar', element('sidebar', $data), TRUE), 'content' => $this->parser->parse('default/' . $page_template . '', $page_data, TRUE), 'footer' => $this->parser->parse('default/sections/footer', element('footer', $data), TRUE));
     // Send all the data to the layout file.
     $this->parser->parse('default/layout', element('templates', $data));
 }
开发者ID:Ragash,项目名称:DoveForums,代码行数:21,代码来源:MY_Controller.php

示例6: doctype

<?php

echo doctype('xhtml1-trans');
?>
  <head>
    <?php 
$this->view->metas();
?>
    <?php 
$this->view->title();
?>
    <?php 
$this->view->asset('css');
?>
    <?php 
echo link_tag(base_url() . 'favicon.ico', 'shortcut icon', 'image/ico');
?>
  </head>
  <body>
    <div id="wrap">
      <div id="header" class="clearfix">
        <h1 class="hidden"><?php 
echo $title;
?>
</h1>
        <div id="logo"><a href="<?php 
echo base_url();
?>
">Demo</a></div>
        <?php 
$this->view->partial('common/_nav');
开发者ID:neolanders,项目名称:ci.view,代码行数:31,代码来源:default.php

示例7: render

    function render()
    {
        $CI =& get_instance();
        /***************************************
         *  saving the page edit mode condition in a 
         * variable so open it in the body after that
         * **************************************/
        $editMode = $CI->vunsy->edit_mode() ? TRUE : FALSE;
        if ($CI->vunsy->section->can_view()) {
            /***************************************
             *  rendering the BEFORE page
             * i must close the edit mode before that 
             * then render it so that the container box don't 
             * display ...
             * **************************************/
            $CI->vunsy->mode = 'view';
            $before_page = new Layout();
            $before_page->get_by_info('BEFORE_PAGE_LOCKED');
            $before_page_text = $before_page->render();
            /***************************************
             *  rendering the page Head
             * without the CSS and JS
             * i have to render them after all the
             * widgets rendered to add all the widgets needed
             * js and css files
             ***************************************/
            $page_head = new Layout();
            $page_head->get_by_info('PAGE_HEAD_LOCKED');
            $page_head_text = $page_head->render();
            /*********************************************
             *  redering the page BODY content
             * here i open the edit mode so the widgets got the
             * container box and the controller buttons
             * and the admin toolbar 
             * ********************************************/
            if ($editMode) {
                $CI->vunsy->mode = 'edit';
            }
            $page_body = new Layout();
            $page_body->get_by_info('PAGE_BODY_LOCKED');
            $page_body_text = $page_body->render();
            if ($CI->vunsy->user->is_root()) {
                $page_body_text .= $CI->load->view('edit_mode/toolbar', '', TRUE);
            }
            /*********************************************
             *  redering the AFTER page content
             * i must close the edit mode variable 
             * before rendering so that the container
             * of editing doesn't rendered
             * ********************************************/
            $CI->vunsy->mode = 'view';
            $after_page = new Layout();
            $after_page->get_by_info('AFTER_PAGE_LOCKED');
            $after_page_text = $after_page->render();
            $doctype_text = doctype($CI->config->item('doctype'));
            /*********************************************************
             * display the page content
             * i sum all the page content text
             * before page + CSS + JS + head + body + after page
             * *******************************************************/
            // Rendering the page
            echo <<<EOT
{$before_page_text}
{$doctype_text}
<html xmlns="http://www.w3.org/1999/xhtml" >
\t<head>
\t<title>{$CI->config->item('site_name')} {$this->name}</title>
\t<meta http-equiv="content-type" content="text/html;charset={$CI->config->item('charset')}" />
\t<meta name="generator" content="VUNSY system" />
{$CI->vunsy->css_text()}
{$CI->vunsy->js_text()}
{$CI->vunsy->dojo_text()}
{$page_head_text}
\t</head>
\t<body class="{$CI->vunsy->dojoStyle}">
\t\t{$page_body_text}
\t</body>
</html>
{$after_page_text}
EOT;
            $CI->vunsy->js = array();
            $CI->vunsy->css = array();
            $CI->vunsy->dojo = array();
        }
        //Very long IF block for view permission
    }
开发者ID:blumine,项目名称:vunsy,代码行数:86,代码来源:section.php

示例8: doctype

        $language = $this->lang_detect->language();
    } else {
        $language = $this->config->item('language');
    }
    $this->session->set_userdata('ua_language', $language);
}
$this->lang->load('index', $language);
$this->lang->load('index', $this->session->userdata('ua_language'));
#### SET THEME
$theme = $this->input->post('go_theme');
if (empty($theme)) {
    $theme = 'goautodial.css';
}
#### LOAD HTML
$this->load->helper('html');
echo doctype('xhtml11') . "\n";
echo "<html>\n";
echo "<head>\n";
#### SET SITE TITLE
#echo "<title>GoAutoDial - Empowering The Next Generation Contact Centers</title>\n";
?>
<title>GoAdmin &reg; 3.0</title>
<link rel="shortcut icon" href="<?php 
echo $base;
?>
img/gologoico.ico" />
<?php 
#### SET META TAGS
$meta = array(array('name' => 'GoAutoDial', 'content' => 'GoAutoDial Inc. http://www.goautodial.com'), array('name' => 'description', 'content' => 'GoAutoDial'), array('name' => 'keywords', 'content' => 'dialer, predictive dialer'), array('name' => 'Content-type', 'content' => 'application/xhtml+xml; charset=utf-8; charset=utf-8', 'type' => 'equiv'));
echo meta($meta) . "\n";
#### SET SITE ICONS
开发者ID:himanshu12k,项目名称:ce-www,代码行数:31,代码来源:go_index_headerbackup.php

示例9: html_helper

 public function html_helper()
 {
     $this->load->helper('html');
     echo doctype('html5');
     echo meta('description', 'My Great site');
     // Generates:  <meta name="description" content="My Great Site" />
     echo meta('Content-type', 'text/html; charset=utf-8', 'equiv');
     // Note the third parameter.  Can be "equiv" or "name"
     // Generates:  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
     echo meta(array('name' => 'robots', 'content' => 'no-cache'));
     // Generates:  <meta name="robots" content="no-cache" />
     $meta = array(array('name' => 'robots', 'content' => 'no-cache'), array('name' => 'description', 'content' => 'My Great Site'), array('name' => 'keywords', 'content' => 'love, passion, intrigue, deception'), array('name' => 'robots', 'content' => 'no-cache'), array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv'));
     echo meta($meta);
     echo link_tag('css/mystyles.css');
     echo link_tag('favicon.ico', 'shortcut icon', 'image/ico');
     echo link_tag('feed', 'alternate', 'application/rss+xml', 'My RSS Feed');
     $link = array('href' => 'css/printer.css', 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'print');
     echo link_tag($link);
     echo heading('Welcome!', 3);
     echo heading('Welcome!', 3, 'class="pink"');
     echo heading('How are you?', 4, array('id' => 'question', 'class' => 'green'));
     echo "<br>";
     echo img('images/picture.jpg');
     echo img('images/picture.jpg', TRUE);
     $image_properties = array('src' => 'images/picture.jpg', 'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time', 'class' => 'post_images', 'width' => '200', 'height' => '200', 'title' => 'That was quite a night', 'rel' => 'lightbox');
     img($image_properties);
     $list = array('red', 'blue', 'green', 'yellow');
     $attributes = array('class' => 'boldlist', 'id' => 'mylist');
     echo ul($list, $attributes);
     $attributes = array('class' => 'boldlist', 'id' => 'mylist');
     $list = array('colors' => array('red', 'blue', 'green'), 'shapes' => array('round', 'square', 'circles' => array('ellipse', 'oval', 'sphere')), 'moods' => array('happy', 'upset' => array('defeated' => array('dejected', 'disheartened', 'depressed'), 'annoyed', 'cross', 'angry')));
     echo ul($list, $attributes);
     echo br(3);
     echo nbs(10);
     echo br(3);
 }
开发者ID:jaffarsolo,项目名称:ci3-examples,代码行数:36,代码来源:Helpers.php

示例10: doctype

<?php echo doctype('html5');?>
<!DOCTYPE html>
<head>
	<title>SIASSM</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/css/materialize.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/fa/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/css/index.css">
</head>
<body>
    <div class="head row yellow darken-2">
    	<div class="col s4 m4">
      <a href="#" class=""><img src="<?php echo base_url();?>/assets/images/icon-logo.png" class="logo"></a>
  </div>
  <div class="col s8 m8">
      <p class="right">LOGGED IN BY <span style="color:black"><?php echo $this->session->logged_in['username'];?></span>
      <?php echo anchor('login/empty_login', 'Logout', 'class="btn-logout waves-effect waves-light btn blue lighten-3"');?></p>
    </div>
</div>
开发者ID:new-project,项目名称:plin-plan-web,代码行数:19,代码来源:template_header.php

示例11: doctype

<?php

echo doctype('xhtml1-trans') . "\n";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
echo meta('Content-type', 'text/html; charset=iso-8859-1', 'equiv') . "\n";
?>


<title>Bolivar International</title>
<?php 
echo link_tag('css/estilos_home.css') . "\n";
echo link_tag('css/sexyalertbox.css') . "\n";
echo link_tag('css/jquery.lightbox-0.5.css') . "\n";
?>
<script type="text/javascript" src="<?php 
echo base_url();
?>
js/AC_RunActiveContent.js"></script>
<script type="text/javascript" src="<?php 
echo base_url();
?>
js/height_page.js"></script>
<script type="text/javascript" src="<?php 
echo base_url();
?>
js/loadImage2.js"></script>
  <script type="text/javascript" src="<?php 
echo base_url();
开发者ID:josu3e,项目名称:bolvar,代码行数:31,代码来源:_template_gimmix.php

示例12: rawurlencode

        if (preg_match('/jpg|jpeg$/i', $e)) {
            $ee = rawurlencode($e);
            //			print("<div class='image'><a target='view' href='".script_name()."?show=$ee'><img src='".php_self()."?thumb=$ee' alt='$e' /><br />$e</a></div>");
            print "<p><a target='view' href='" . script_name() . "?show={$ee}'>" . preg_replace('/.jpeg$|.jpg$/i', '', $e) . "</a></p>";
        } elseif (is_dir($n . '/' . $e) and file_exists($n . '/' . $e . '/index.php')) {
            print "<p><a href='../{$e}/index.php/index-frame'>{$e}</a></p>";
        } elseif (is_dir($n . '/' . $e)) {
            print "<p><a href='../{$e}/'>{$e}</a></p>";
        }
    }
    ?>
	</body>
</html>
	<?php 
} elseif ($_SERVER['PATH_INFO'] == '/view-frame') {
    print doctype("XHTML/1.0") . "\n";
    ?>
<html>
	<head><title></title>
		<meta http-equiv='Content-type' value='text/html; charset=UTF-8' />
		<?php 
    if (STYLESHEET_BASE) {
        $ss = STYLESHEET_BASE . "/style.css";
        print "<link rel='StyleSheet' href='{$ss}' type='text/css'/>";
    }
    ?>
	</head>
	<body><?php 
    $text = @join('', @file('main.txt'));
    print wiki_render($text);
    ?>
开发者ID:nbtscommunity,项目名称:phpfnlib,代码行数:31,代码来源:index.php

示例13: setDocType

 public function setDocType($doctype = '')
 {
     $this->_head_tags['doctype'] = doctype($doctype) . PHP_EOL;
 }
开发者ID:labeetotrent,项目名称:latthiya,代码行数:4,代码来源:Template.php

示例14: generate

 /**
  *	Generates the html tag with its content
  *
  *	@return string
  *	@access public
  */
 function generate()
 {
     if (!is_null($this->_oDoc)) {
         $this->_sDoc = doctype();
         $this->_sDoc .= $this->_oDoc->generate();
         return $this->_sDoc;
     } else {
         show_error('You must use the <big>doc</big> method before using <big>output</big> or <big>generate</big> methods', 500);
     }
 }
开发者ID:Cyb3rNet,项目名称:codeigniter-xhtml,代码行数:16,代码来源:Xhtml.php

示例15: doctype

<?php echo doctype('html4-trans'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?php echo $titulo ?></title>
		<?php
			echo link_tag('externalfiles/css/administracao.css');
		
			$meta = array(
			        array('name' => 'robots', 'content' => 'NOFOLLOW, NOINDEX'),
			        array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv')
			);
			echo meta($meta);
			?>
			
			<script type="text/javascript" 
					src="<?php echo base_url(); ?>externalfiles/js/jquery-1.5.1.min.js">
					</script>	
	</head>

	<body>
开发者ID:rodolfospalenza,项目名称:learning-code-igniter,代码行数:20,代码来源:header.php


注:本文中的doctype函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。