为什么我的网站不能直接输入域名访问,而是需要www.XXX.com/index.php?abc=123
我希望我能通过www.xxx.com或者xxx.com这样访问,可是我直接这样输入不能显示首页,即使我直接输入www.XXX.com/index.html也不能显示首页
我的代码是下载来的,不知道是php的问题还是apache配置的问题,还是其他?
请各位高人指点一下!
我希望我能通过www.xxx.com或者xxx.com这样访问,可是我直接这样输入不能显示首页,即使我直接输入www.XXX.com/index.html也不能显示首页
我的代码是下载来的,不知道是php的问题还是apache配置的问题,还是其他?
请各位高人指点一下!
你没有存在index.html 他怎么会显示呢?如果输入index.php显示不正常,那么就将index.php的源码发出来另外apache 里设置一下索引页面为index.php 将其他的删除掉得了
<?php
/**
* @version $Id: index.php 1 9:23 2010-11-11 tianya $
* @package DedeCMS.Site
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))
{
header('Location:install/index.php');
exit();
}
//自动生成HTML版
if(isset($_GET['upcache']) || !file_exists('index.html'))
{
require_once (dirname(__FILE__) . "/include/common.inc.php");
require_once DEDEINC."/arc.partview.class.php";
$GLOBALS['_arclistEnv'] = 'index';
$row = $dsql->GetOne("Select * From `#@__homepageset`");
$row['templet'] = MfTemplet($row['templet']);
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
$row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0;
if ($row['showmod'] == 1)
{
$pv->SaveToHtml(dirname(__FILE__).'/index.html');
include(dirname(__FILE__).'/index.html');
exit();
} else {
$pv->Display();
exit();
}
}
else
{
header('HTTP/1.1 301 Moved Permanently');
header('Location:index.html');
}
?>
请到他官网去下载使用手册
吃人家的饭,就得受人家管
你指定默认的运行文件了没?
你指定默认的运行文件了没?也由此疑问,不设置的话无法访问