Hello,
I getting this bug while launching a project in local server.
I want to fix this bug. Do you know why I go this type of error?
pls…
PHP Notice – yii\base\ErrorException
Use of undefined constant pathInfo - assumed ‘pathInfo’
-
in D:\xampp\htdocs\foldername\vendor\yiisoft\yii2\web\Request.php at line 719
$pathInfo = substr($pathInfo, strlen($scriptUrl)); } elseif ($baseUrl === '' || strpos($pathInfo, $baseUrl) === 0) { $pathInfo = substr($pathInfo, strlen($baseUrl)); } elseif (isset($_SERVER['PHP_SELF']) && strpos($_SERVER['PHP_SELF'], $scriptUrl) === 0) { $pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl)); } else { throw new InvalidConfigException('Unable to determine the path info of the current request.'); }
if (pathInfo[0] == ‘/’) { //This line showing a error.
//pathInfo = substr($pathInfo, 1); } return (string) $pathInfo;
}
/**
-
Returns the currently requested absolute URL.
-
This is a shortcut to the concatenation of [[hostInfo]] and [[url]]
-