search

Home  >  Q&A  >  body text

The non-existent .shtml file is introduced into the entry file index.php

Newbie, I don’t understand, please give me some answers. The index.php code is as follows

<?php

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

date_default_timezone_set('Etc/GMT-8');

set_time_limit(0);

//Define the site path D:\website\seerpro\

define('WEB_ROOT', rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);

//Define the extension library path

define('EXT_LIB_ROOT', WEB_ROOT . 'lib/');

include_once WEB_ROOT . 'easyphp/EasyPHP.class.php';

//Configuration file.

$configFile = WEB_ROOT . 'config. php';


//Personal homepage

$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);



####################################################################################################################################################################################################### /website-".$URIstr.'.shtmlURL path does not exist or the page is blank. ###
罗秋菊罗秋菊2379 days ago1202

reply all(1)I'll reply

  • PHP中文网

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

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

    Isn’t what you wrote here very obvious?

    Another possibility is that the pseudo-static path you configured has been redefined

    reply
    0
  • Cancelreply