當前位置: 首頁>>代碼示例>>PHP>>正文


PHP render_template函數代碼示例

本文整理匯總了PHP中render_template函數的典型用法代碼示例。如果您正苦於以下問題:PHP render_template函數的具體用法?PHP render_template怎麽用?PHP render_template使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了render_template函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: list_action

 function list_action()
 {
     $postsModel = new PostsModel();
     $posts = $postsModel->get_all_posts();
     $html = render_template('view/template/list.php', array('posts' => $posts));
     return $html;
     //require "view/template/list.php";
 }
開發者ID:sergeysubbotin,項目名稱:subbotin,代碼行數:8,代碼來源:userscontroller.php

示例2: photo_del

 public static function photo_del()
 {
     $photoId = empty($_GET['photoId']) ? "" : $_GET['photoId'];
     mod_index::delPhoto($photoId);
     $rs = mod_index::getPhoto();
     render_template("photo.php", array("photo_list" => $rs));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:7,代碼來源:ctl_upload.php

示例3: update_action

function update_action()
{
    update_row();
    $rows = get_all_rows();
    $html = render_template("view/admin.php", array('rows' => $rows));
    return $html;
}
開發者ID:deniya,項目名稱:mysite,代碼行數:7,代碼來源:controller.php

示例4: edit_action

function edit_action($id)
{
    edit_post($id);
    $posts = get_all_posts();
    $html = render_template('View/Templates/admin.php', array('posts' => $posts));
    return $html;
}
開發者ID:JuriZurakovski,項目名稱:2KTVRp2015,代碼行數:7,代碼來源:controller.php

示例5: add_page

 public static function add_page()
 {
     $courseId = $_GET['snavId'];
     $navId = $_GET['navId'];
     $type = $_GET['type'];
     render_template("student_add.php", array("navId" => $navId, "snavId" => $courseId, "type" => $type));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:7,代碼來源:ctl_thanks.php

示例6: update_action

function update_action($id)
{
    update_post($id);
    $posts = get_all_posts();
    $html = render_template("view/templates/admin.php", array('posts' => $posts));
    return new Response($html);
}
開發者ID:JelenaKop,項目名稱:2KTVR,代碼行數:7,代碼來源:controller.php

示例7: template_article

function template_article($article, $single = false)
{
    global $context;
    if (isset($context['tportal']['article_expired'])) {
        template_notpublished();
    }
    render_template(article_renders(!empty($article['category_opts']['catlayout']) ? $article['category_opts']['catlayout'] : 1, true, true));
}
開發者ID:rhodefey,項目名稱:TinyPortal,代碼行數:8,代碼來源:TPortal.template.php

示例8: delJoinus

 public static function delJoinus()
 {
     $navId = $_GET['navId'];
     $snavId = $_GET['snavId'];
     $id = $_GET['joinusId'];
     mod_joinus::delJoinus($id);
     render_template("joinus.php", array("navId" => $navId, "snavId" => $snavId));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:8,代碼來源:ctl_joinus.php

示例9: delAdvice

 public static function delAdvice()
 {
     $navId = $_GET['navId'];
     $snavId = $_GET['snavId'];
     $id = $_GET['adviceId'];
     mod_advice::delAdvice($id);
     render_template("buy.php", array("navId" => $navId, "snavId" => $snavId));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:8,代碼來源:ctl_advice.php

示例10: index

 public static function index()
 {
     $courseId = $_GET['snavId'];
     $navId = $_GET['navId'];
     $courseId = $_GET['snavId'];
     $content = mod_course::getOne($courseId);
     render_template("course.php", array("navId" => $navId, "snavId" => $courseId, "content" => $content));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:8,代碼來源:ctl_course.php

示例11: delBuy

 public static function delBuy()
 {
     $navId = $_GET['navId'];
     $snavId = $_GET['snavId'];
     $id = $_GET['buyId'];
     mod_buy::delBuy($id);
     render_template("buy.php", array("navId" => $navId, "snavId" => $snavId));
 }
開發者ID:zcmyworld,項目名稱:nothing,代碼行數:8,代碼來源:ctl_buy.php

示例12: render_view

 function render_view($name, $layout = 'default')
 {
     ob_start();
     global $current_view;
     $current_view = $name;
     render_template("layouts/{$layout}");
     ob_flush();
 }
開發者ID:nebirhos,項目名稱:wordless,代碼行數:8,代碼來源:render_helper.php

示例13: delete_action

function delete_action($id)
{
    $postsModel = new PostsModel();
    $postsModel->delete_post($id);
    $posts = $postsModel->get_all_posts();
    $html = render_template('view/template/admin.php', array('posts' => $posts));
    return $html;
}
開發者ID:sergeysubbotin,項目名稱:subbotin,代碼行數:8,代碼來源:controller.php

示例14: show_action

function show_action($id)
{
    //$id=$_REQUEST['id'];
    //$sql="SELECT * FROM `pages` WHERE `id`=$id";
    //$row=get_all_rows($sql);
    $rows = get_row($id);
    $html = render_template("View/show.php", array('rows' => $rows));
    return $html;
}
開發者ID:Olikainen,項目名稱:mysite,代碼行數:9,代碼來源:controller.php

示例15: admin_action

function admin_action()
{
    if (isset($_POST['submit'])) {
        add_post();
    }
    $posts = get_all_posts();
    $html = render_template('view/templates/admin.php', array('posts' => $posts));
    return $html;
    //require "view/templates/admin.php";
}
開發者ID:VassiljevaGalina,項目名稱:Vassiljeva,代碼行數:10,代碼來源:controller.php


注:本文中的render_template函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。