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