本文整理汇总了PHP中QQ::server方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::server方法的具体用法?PHP QQ::server怎么用?PHP QQ::server使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::server方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?php
# define('WE_ARE_TESTING', true);
require_once 'init.php';
$qq = new QQ();
$server = $qq->server();
$qv = array();
$qv['server'] = $server;
$qv['flash'] = $qq->flash();
$qv['pagetitle'] = '';
$qv['basehref'] = 'http://' . ($server['host'] == 'songwork.dev' ? 'songwork.dev' : 'songwork.com');
$qv['bodyid'] = str_replace('/', '-', $server['script']);
if (strpos($qv['bodyid'], '-') === false) {
$qv['bodyid'] = 'x-' . $qv['bodyid'];
}
########### IDENTIFICATION
$p = Person::get_by_cookie();
# lopass interception: http://songwork.com/home/1234/ab8f
# not full auth, only to have existing client's name & address pre-filled from database for forms
if ($p === false && isset($_SERVER['PATH_INFO']) && preg_match('/\\/(\\d*)\\/([0-9a-zA-Z]{4})$/', $_SERVER['PATH_INFO'], $matches)) {
$possible_id = $matches[1];
$possible_lopass = $matches[2];
$pp = Person::get_by_id_lopass($possible_id, $possible_lopass);
if ($pp !== false) {
$pp->set_welcome_cookie();
$p = $pp;
}
}
$student = Student::get_by_person($p);
$teacher = Teacher::get_by_person($p);
$admin = Administrator::get_by_person($p);