本文整理汇总了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());
}
示例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');
示例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']));