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


PHP config::servroot方法代碼示例

本文整理匯總了PHP中config::servroot方法的典型用法代碼示例。如果您正苦於以下問題:PHP config::servroot方法的具體用法?PHP config::servroot怎麽用?PHP config::servroot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在config的用法示例。


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

示例1: __construct

 function __construct()
 {
     parent::__construct();
     $this->template_dir = config::servroot() . "/protected/smarty/templates";
     $this->compile_dir = config::servroot() . "/protected/smarty/templates_c";
     $this->cache_dir = config::servroot() . "/protected/smarty/cache";
     $this->config_dir = config::servroot() . "/protected/smarty/config";
     //$this->default_modifiers = array('escape:"htmlall":"UTF-8"','nl2br');
     $this->assign('webroot', config::webroot());
 }
開發者ID:ANumbersGame,項目名稱:anumbersgame,代碼行數:10,代碼來源:template.php

示例2: template

<?php

require_once '../protected/config.php';
require_once config::servroot() . "/protected/smarty/template.php";
$template = new template();
/*
require_once ('../protected/db/dbview.php');

$dbh = new dbview();
*/
/*
$template->assign('name', 'World');
*/
$template->display('index.tpl');
開發者ID:ANumbersGame,項目名稱:anumbersgame,代碼行數:14,代碼來源:index.php

示例3: template

<?php

require_once '../../../protected/config.php';
require_once config::servroot() . "/protected/smarty/template.php";
$template = new template();
require_once config::servroot() . "/protected/db/dbview.php";
$dbh = new dbview();
// Find the tournament specified by the URL
$sres = $dbh->get('select count(*) as many
from tournaments
where id = :id
and year = :year
and aka = :aka', array(':id' => $_GET['id'], ':aka' => $_GET['aka'], ':year' => $_GET['year']));
if (0 == $sres[0]['many']) {
    error_log("Can't find series: aka: {$_GET['aka']}, id: {$_GET['id']}, year: {$_GET['year']}");
    // Find all tournaments with a given aka
    $akaAll = 'select 
tournaments.name as name, 
tournaments.year, 
tournaments.id, 
start,
host,
schools.name as sname
from tournaments
left join schools
on host = schools.id
and tournaments.year = schools.year
where tournaments.aka = :aka
order by start desc, tournaments.name';
    // All tournaments witht eh aka given by the URL
    $akaGrp = $dbh->get($akaAll, array(':aka' => $_GET['aka']));
開發者ID:ANumbersGame,項目名稱:anumbersgame,代碼行數:31,代碼來源:index.php


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