新手,不懂,請各位大神解答,index.php代碼如下
<?php
header("Content-type: text/html; charset=utf-8");
date_default_timezone_set('Etc/GMT-8');
set_time_limit(0);
//定義站點路徑 D:\website\seerpro\
define('WEB_ROOT', rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
//定義擴展庫路徑
define('EXT_LIB_ROOT', WEB_ROOT . 'lib/');
include_once WEB_ROOT . 'easyphp/EasyPHP.class.php';
//配置文件.
$configFile = WEB_ROOT . 'config.php';
//個人主頁
$URIstr = $_SERVER['REQUEST_URI'];
$URIstr = trim($URIstr, '/');
if(strpos($URIstr, '/') === false && strpos($URIstr, '?') === false && !empty($URIstr))
{
header("Location: /member/space/website-".$URIstr.'.shtml');
}
EasyPHP::doItEasy($configFile);
localhost 訪問一直提示/member/space/website-".$URIstr.'.shtmlURL路徑不存在或者頁面一片空白。。
if(strpos($URIstr,?'/')?===?false?&&?strpos($URIstr,?'?')?===?false?&&?!empty($URIstr)) { header("Location:?/member/space/website-".$URIstr.'.shtml'); }
你這里寫的不是很肥明顯嗎? ?
還有一個可能 是你配置過偽靜態(tài)路徑被重新定義了