只是打开一个登陆界面而已。居然要打开一分钟!!
该页面其他的所有相应时间最高都只有30MS,只有login.php这个页面的时间长至1分多钟!
解析域名:0ms
建立连接:15ms
发送请求:0ms
等待响应: 1m5s
接受数据:0ms
这是火狐得到的数据!
怎么回事啊!!!!!
只是登陆界面啊?能有什么啊?想不通啊有木有!!!
该页面其他的所有相应时间最高都只有30MS,只有login.php这个页面的时间长至1分多钟!
解析域名:0ms
建立连接:15ms
发送请求:0ms
等待响应: 1m5s
接受数据:0ms
这是火狐得到的数据!
怎么回事啊!!!!!
只是登陆界面啊?能有什么啊?想不通啊有木有!!!
解决方案 »
- php设置文件内容长度
- 我想建个网站有意者请联系QQ552198603
- 请问怎样使用PAZU打印控件?
- 推荐几本php的好书吗入门进阶都可
- php中unicode字符怎么才能转换UTF-8?
- 请教一个正则判断问题..
- input type的问题
- Qq 挂机问题
- PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
- # 哪位有php 4.3.1 的 zip包?急用!100分相赠,谢谢!
- apache安装配置问题。为什么会出现这种错误?apache_2.2.4和php-5.2.13在win7下怎么配置比较好。
- php 数组key与value的问题
<?php
session_start();
include_once '../include/config_const.php';
include_once 'globals.php';
$tpl->display("login.tpl");
?>
config_const.php
只有参数,就不发了
globals.php
<?php
require_once('../include/config_base.php'); //数据库连接
require_once 'smarty_config.php';//包含SMARTY模板引擎
global $cfg_site,$cfg_www,$cfg_pre,$cfg_dbname,$cfg_webdir,$cfg_logo,$cfg_cookies,$cfg_keywords,$cfg_description,$cfg_icp,$cfg_status,$cfg_status_caption,$cfg_email,$cfg_company,$cfg_address,$cfg_postcode,$cfg_phone,$cfg_fax,$cfg_tel,$cfg_msn,$cfg_qq,$cfg_status_rewrite,$cfg_status_user,$cfg_status_gbook,$cfg_default_skin,$cfg_model,$cfg_plugins;
global $db,$listpage,$common_func,$filter,$tpl;
//初始化网站基本参数
$cfg_array=array("site"=>$cfg_site,"www"=>$cfg_www,"webdir"=>$cfg_www.$cfg_webdir,"logo"=>$cfg_logo,"cookies"=>$cfg_cookies,"keywords"=>$cfg_keywords,"description"=>$cfg_description,"icp"=>$cfg_icp,"status"=>$cfg_status,"status_caption"=>$cfg_status_caption,"email"=>$cfg_email,"company"=>$cfg_company,"address"=>$cfg_address,"postcode"=>$cfg_postcode,"phone"=>$cfg_phone,"fax"=>$cfg_fax,"tel"=>$cfg_tel,"msn"=>$cfg_msn,"qq"=>$cfg_qq,"status_rewrite"=>$cfg_status_rewrite,"status_user"=>$cfg_status_user,"status_gbook"=>$cfg_status_gbook,"default_skin"=>$tpl->template_dir."images/".$cfg_default_skin."/","model"=>$cfg_model,"plugins"=>$cfg_plugins,"templets_default"=>$tpl->templets_default,"template_dir"=>$tpl->template_dir,"compile_dir"=>$tpl->compile_dir,"config_dir"=>$tpl->config_dir,"cache_dir"=>$tpl->cache_dir,"caching"=>$tpl->caching);
$tpl->assign("cfg",$cfg_array);
$system_array=array("SERVER_NAME"=>gethostbyname($_SERVER['SERVER_NAME']),"PATH"=>$_SERVER['PATH_TRANSLATED'],"SERVER_SOFTWARE"=>$_SERVER['SERVER_SOFTWARE'],"PHP_VERSION"=>PHP_VERSION,"MYSQL_VERSION"=>@mysql_get_server_info(),"PHP_SELF"=>$_SERVER['PHP_SELF']);
$tpl->assign("system",$system_array);
switch ($cfg_default_skin){
case "green":
$skin_color_over="#EBFFDC";
$skin_color_out="#ffffff";
break;
case "blue":
$skin_color_over="#DBECFE";
$skin_color_out="#ffffff";
break;
default:
$skin_color_over="#EBFFDC";
$skin_color_out="#ffffff";
break;
}
$tpl->assign("skin_color_over",$skin_color_over);
$tpl->assign("skin_color_out",$skin_color_out);
/**
* 生成编辑器
* @param string input_name 输入框名称
* @param string input_value 输入框值
*/
function getEditor($input_name='content', $input_value = '',$type='Basic'){
//global $tpl;
//包含fckeditor类
include_once("../include/fckeditor/fckeditor.php") ;
//创建一个FCKeditor,表单名称为 content
$oFCKeditor = new FCKeditor($input_name);
//设置编辑器路径
$oFCKeditor->BasePath = "../include/fckeditor/";
$oFCKeditor->ToolbarSet = $type;
$oFCKeditor->Value =$input_value; //;设置初始内容";
$oFCKeditor->Width="96%"; //设置它的宽度
$oFCKeditor->Height="296px"; //设置它的高度
$FCKeditor=$oFCKeditor->CreateHtml();
return $FCKeditor;
//$tpl->assign($input_name, $FCKeditor);
}
?>
我没写的文件全部都是参数文件。。
看看其他需要数据库连接的页面是否也是这么慢
另外看看刷新本页面是否也是这么慢另外关闭浏览器,自写一个数据库连接测试
但是不是这个原因。
我已经自己找到了,是代码问题。
我是逐句 用 time() 检查出来的
"SERVER_NAME"=>gethostbyname($_SERVER['SERVER_NAME']) 这句话有问题。