>  Q&A  >  본문

존재하지 않는 .shtml 파일이 항목 파일 index.php에 도입되었습니다.

새내기 이해가 안가네요. index.php 코드는 다음과 같습니다

<?php

header("Content-type: text/html; charset=utf-8");

date_default_timezone_set('Etc/ GMT-8');

set_time_limit(0);

//사이트 경로 정의 D:websiteseerpro

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 = 'config.php';


//개인 홈페이지

$URIstr = $_SERVER['REQUEST_URI'];

$URIstr = Trim($URIstr, '/');

if (strpos($URIstr, ' /') === false && strpos($URIstr, '?') === false && !empty($URIstr))

{

header("위치: /member/space /website-".$URIstr .'.shtml');

}


EasyPHP::doItEasy($configFile);



localhost에서는 /member/space/website에 액세스할 때 계속 메시지를 표시합니다. -".$URIstr.'. shtmlURL 경로가 존재하지 않거나 페이지가 비어 있습니다

.
罗秋菊罗秋菊2331일 전1154

모든 응답(1)나는 대답할 것이다

  • PHP中文网

    PHP中文网2018-05-10 19:07:15

    if(strpos($URIstr, '/') === false && strpos($URIstr, '?') === false && !empty($URIstr))
    {
    header("Location: /member/space/website-".$URIstr.'.shtml');
    }

    여기에 쓴 내용이 너무 뻔하지 않나요?

    또 다른 가능성은 구성한 의사 정적 경로가 재정의되었다는 것입니다

    회신하다
    0
  • 취소회신하다