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


PHP Header::compose方法代码示例

本文整理汇总了PHP中Header::compose方法的典型用法代码示例。如果您正苦于以下问题:PHP Header::compose方法的具体用法?PHP Header::compose怎么用?PHP Header::compose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Header的用法示例。


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

示例1:

<?php

require_once 'includes/common.php';
// do your controller calls
include $globs[1] . "application_controller.php";
// calls navigation in
//include $globs[1]."homepage_controller.php";
//echo $_SESSION['last_upload'];
$title = "Upload Finished";
$meta_keys = "";
$meta_description = "";
$header = Header::compose("Everyone Needs a Blog", $title, $meta_keys, $meta_description, "uploaded");
echo $header;
$contents['page_contents'] = '<img src="../blog/media/' . $_SESSION['last_upload'] . '"/>';
//render out your view
include 'views/regular_header_view.php';
include 'views/simple_page_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:20,代码来源:show_image.php

示例2:

<?php

require_once '../blog/includes/session.php';
require_once '../blog/classes/clsLayout.php';
// do your controller calls
//include $globs[1]."application_controller.php"; // calls navigation in
//include $globs[1]."homepage_controller.php";
$title = "Hacker Dojo::Log User In";
$meta_keys = "hacker dojo, mountain view, blogs, building a simple blog";
$meta_description = "Blogs have all the elements we need to create a very sophisticated system";
$header = Header::compose("User Login", $title, $meta_keys, $meta_description, "lesson");
echo $header;
//render out your view
include '../class_views/auth_login_user_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:17,代码来源:login_user.php

示例3:

<?php

// The objective here is to take a simple web form (slightly designed with the help of css 3), and post the contents to a page to do some magic with them.
require_once '../blog/classes/clsLayout.php';
// do your controller calls
//include $globs[1]."application_controller.php"; // calls navigation in
//include $globs[1]."homepage_controller.php";
$title = "Hacker Dojo::OOP PHP Blog";
$meta_keys = "hacker dojo, mountain view, blogs, building a simple blog";
$meta_description = "Blogs have all the elements we need to create a very sophisticated system";
$header = Header::compose("Form 2: Received Post", $title, $meta_keys, $meta_description, "lesson");
echo $header;
//render out your view
include '../class_views/lesson_post_received_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:17,代码来源:post_variables_part_2.php

示例4: array

<?php

require_once 'classes/clsGlobals.php';
require_once 'classes/clsLayout.php';
require_once 'classes/clsPage.php';
require_once 'classes/clsDatabase.php';
// do header
$header = Header::compose("main", "homepage", "keys", "description", "home");
echo $header;
// bring in controllers and page
// include controllers if any
// contollers can be array or string
$controllers = array("basic_page", "more_stuff");
$controllers_for_page = PageControllers::buildPage($controllers);
// now that we have our content, let's build our view
require_once 'views/home_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:19,代码来源:index.php

示例5:

<?php

// The objective here is to take a simple web form (slightly designed with the help of css 3), and post the contents to a page to do some magic with them.
require_once '../blog/includes/session.php';
require_once '../blog/classes/clsLayout.php';
// do your controller calls
//include $globs[1]."application_controller.php"; // calls navigation in
//include $globs[1]."homepage_controller.php";
$title = "DOJO PHP: Week 8: Sessions";
$meta_keys = "hacker dojo, mountain view, blogs, building a simple blog";
$meta_description = "Blogs have all the elements we need to create a very sophisticated system";
$header = Header::compose("Form Message Success: Post in Database", $title, $meta_keys, $meta_description, "lesson");
echo $header;
//render out your view
include '../class_views/sessions_intro_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:18,代码来源:sessions_overview.php

示例6: switch

include $globs[1] . "application_controller.php";
// calls navigation in
// now fill in the body of the page
switch ($_REQUEST['action']) {
    case "show":
        if ($_REQUEST['id']) {
            $post = (int) $_REQUEST['id'];
        }
        if ($post) {
            $blog = new Blog();
            $contents = $blog->readBlogPost(0, 1, $post, null);
            //print_r($blog_post);
            $title = $contents[0]['blog_title'];
            $meta_keys = $contents[0]['blog_keywords'];
            $meta_description = $contents[0]['blog_description'];
            $header = Header::compose("About this Blog", $title, $meta_keys, $meta_description, "blog");
            echo $header;
            //render out your view
            include 'views/regular_header_view.php';
            include 'views/blog_show_view.php';
            //hear comes the footer
            $footer = Footer::foundation("main");
            echo $footer;
        } else {
            echo 'failed';
        }
        break;
    case "edit":
        break;
    case "destroy":
        break;
开发者ID:newfront,项目名称:dojophp,代码行数:31,代码来源:blog_entry.php

示例7: header

<?php

//make sure you have this require, otherwise the current session data is not available
require_once '../blog/includes/session.php';
// THIS PAGE IS BEHIND A SESSION
if ($_SESSION['loggedin']) {
    //load in the clsLayout.php file cause you need it now
    require_once '../blog/classes/clsLayout.php';
    // do your controller calls
    //include $globs[1]."application_controller.php"; // calls navigation in
    //include $globs[1]."homepage_controller.php";
    $title = "Hacker Dojo::Super Secret Session Controlled Area";
    $meta_keys = "hacker dojo, mountain view, blogs, building a simple blog";
    $meta_description = "Blogs have all the elements we need to create a very sophisticated system";
    $header = Header::compose("Welcome to Secrets", $title, $meta_keys, $meta_description, "lesson");
    echo $header;
    //render out your view
    include '../class_views/super_session_secret_view.php';
    //hear comes the footer
    $footer = Footer::foundation("main");
    echo $footer;
} else {
    header("Location: /week_eight/sessions_overview.php?mess=login to view content");
    //echo 'This area is private. Please <a href="/week_eight/sessions_overview.php">Go Back</a>';
}
开发者ID:newfront,项目名称:dojophp,代码行数:25,代码来源:secret_loggedin_area.php

示例8:

     $meta_description = $contents['page_description'];
     $header = Header::compose("About this Blog", $title, $meta_keys, $meta_description, "about");
     echo $header;
     //render out your view
     include 'views/regular_header_view.php';
     include 'views/simple_page_view.php';
     //hear comes the footer
     $footer = Footer::foundation("main");
     echo $footer;
     break;
 case "recent":
     require $globs[1] . "recent_controller.php";
     $title = 'Recent Blog Posts';
     $meta_keys = "";
     $meta_description = "";
     $header = Header::compose("Recent Posts", $title, $meta_keys, $meta_description, "recents");
     echo $header;
     //render out your view
     include 'views/regular_header_view.php';
     $contents['page_contents'] = $recent_posts;
     include 'views/simple_page_view.php';
     //hear comes the footer
     $footer = Footer::foundation("main");
     echo $footer;
     break;
 case "show":
     echo 'cool';
     break;
 case "legal":
     break;
 default:
开发者ID:newfront,项目名称:dojophp,代码行数:31,代码来源:blog.php

示例9:

<?php

require_once 'classes/clsGlobals.php';
require_once 'classes/clsLayout.php';
require_once 'classes/clsController.php';
require_once 'classes/clsDatabase.php';
// do header
$title = "Cool Page 2";
$header = Header::compose("cool", $title, "keys,values,class,scripting", "Fun class description is cool and stuff", "contact");
echo $header;
// bring in controllers and page
// include controllers if any
// contollers can be array or string
//$controllers = array("basic_page","more_stuff");
//$controllers_for_page = PageControllers::buildPage($controllers);
// send fix on the controller class (clsController.php)
require 'controllers/basic_page_controller.php';
require 'controllers/more_stuff_controller.php';
// now that we have our content, let's build our view
include 'views/home_view.php';
//hear comes the footer
$footer = Footer::foundation("main");
echo $footer;
开发者ID:newfront,项目名称:dojophp,代码行数:23,代码来源:index.php


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