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


PHP Web::getClass方法代码示例

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


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

示例1: error_reporting

Modified version of class done by David Marco Martinez
*/
require_once "lib/cls/Web.cls.php";
require_once "cls/install.cls.php";
error_reporting(E_ALL);
// Record the start time of execution
$mtime = microtime(true);
// Start php session BEFORE ANY output
session_start();
// Load conf
//require_once( 'conf/user.conf.php' );
install::setDefines();
require_once 'conf/system.conf.php';
// Build the base of the app
$web = Web::getClass('install');
// Page specific operations and display
if (is_writable(DIR_TPL_COMPILE)) {
    $web->display('install/index');
} else {
    echo "Template dir " . DIR_TPL_COMPILE . " is not writable for webserver. Please change permissions and reload this page.";
}
// Record end time
$ftime = microtime(true);
$total = $ftime - $mtime;
//echo "total: " . $total . 's<br />';
// If end time is shorter than 0.5 segons sleep untill then
if ($total < MIN_TIME) {
    usleep(floor((MIN_TIME - $total) * 1000000));
    //echo 'lost time: ' . (MIN_TIME - $total) . 's<br />';
}
开发者ID:santa01,项目名称:wtorrent,代码行数:30,代码来源:install.php

示例2: error_reporting

Modified version of class done by David Marco Martinez
*/
error_reporting(E_ALL & ~E_DEPRECATED);
// changing it from E_ALL, ticket: #414
// Record the start time of execution
$mtime = microtime(true);
// Start php session BEFORE ANY output
session_start();
// Load conf
if (is_readable('conf/user.conf.php') && is_readable('conf/system.conf.php')) {
    require_once 'conf/user.conf.php';
    require_once 'conf/system.conf.php';
} else {
    echo "One of the required configuration files is not readable, please check permissions or run <a href=\"install.php\">install.php</a> to set up wTorrent";
}
// Build the base of the app
$web = Web::getClass('ListT');
// Page specific operations and display
$web->display('index');
// Record end time
$ftime = microtime(true);
$total = $ftime - $mtime;
//echo "total: " . $total . 's<br />';
// If end time is shorter than 0.5 segons sleep untill then
if ($total < MIN_TIME) {
    usleep(floor((MIN_TIME - $total) * 1000000));
    //echo 'lost time: ' . (MIN_TIME - $total) . 's<br />';
}
// REAL end time (Should be about MIN_TIME + 0.1s)
$fftime = microtime(true);
$total = $fftime - $mtime;
开发者ID:santa01,项目名称:wtorrent,代码行数:31,代码来源:index.php


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