Esempio n. 1
0
}
//设置字符集编码
header('Content-Type: text/html; charset=utf-8');
//转换硬路径常量
define('ROOT_PATH', substr(dirname(__FILE__), 0, -8));
//拒绝PHP低版本
if (PHP_VERSION < '4.1.0') {
    exit('Version is to Low!');
}
//创建一个自动转义状态的变量
define('GPC', get_magic_quotes_gpc());
//引入函数库
require ROOT_PATH . 'includes/global.func.php';
require ROOT_PATH . 'includes/mysql.func.php';
//执行耗时
define('START_TIME', _runtime());
//$GLOBALS['start_time'] = _runtime();
//echo  round((_runtime() - START_TIME),4);放在别的地方可以检测运行时间
//链接数据库
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PWD', '123456');
define('DB_NAME', 'testguest');
_connect();
//创建数据库连接
_select_db();
//选择一款数据库
_set_names();
//选择字符集
//网站系统设置初始化
if (!!($_rows = _fetch_array("SELECT\n\t    tg_webname,\n\t\ttg_article,\n\t\ttg_blog,\n\t\ttg_photo,\n\t\ttg_skin,\n\t\ttg_string,\n\t\ttg_post,\n\t\ttg_re,\n\t\ttg_code,\n\t\ttg_register\n\tFROM\n\t\ttg_system\n\tWHERE\n\t\ttg_id=1\n\tLIMIT\n\t\t1"))) {
Esempio n. 2
0
<?php

/**
* TestGuest Version1.0
* ================================================
* Copy 2010-2012 yc60
* Web: http://www.yc60.com
* ================================================
* Author: Lee
* Date: 2010-8-10
*/
//防止恶意调用
if (!defined('IN_TG')) {
    exit('Access Defined!');
}
_close();
?>
<div id="footer">
	<p>本程序执行耗时为: <?php 
echo round(_runtime() - START_TIME, 4);
?>
秒</p>
	<p>版权所有 翻版必究</p>
	<p>本程序由<span>瓢城Web俱乐部</span>提供 源代码可以任意修改或发布 (c) yc60.com</p>
</div>
Esempio n. 3
0
<?php

if (!defined('IN_TG')) {
    echo "access denied";
    exit;
}
//转换硬路径常量
define('root', substr(dirname(__FILE__), 0, -8));
//拒绝php低版本
if (PHP_VERSION < '4.1.0') {
    exit('php版本过低');
}
//引入核心函数库
require root . 'includes/global.func.php';
//执行时间	写在footer里
$_startTime = _runtime();
<?php

//防止恶意调用
if (!defined('IN_TG')) {
    exit("Access Defined!");
}
_close();
?>
<div id="footer">
		<p>本程序耗时:<?php 
echo _runtime() - START_TIME;
?>
Ãë</p>
		<p>版权没有 翻版不究</p>
		<p>本程序由<span>Pantasun</span>提供</p>
</div>
Esempio n. 5
0
<?php

if (!defined('IN_TG')) {
    echo "access denied";
    exit;
}
//echo round(_runtime()-$_startTime,4)
//usleep(2000000);
?>
<div id="footer">
	<p>本程序执行耗时:<?php 
echo round(_runtime() - $_startTime, 4);
?>
秒</p>
	<p>版权所有 翻版必究</p>
	<p>本程序由<span>瓢城Web俱乐部</span>提供 源代码可以任意修改或发布 (c) yc60.com</p>
</div>