yii\base\Request::setScriptFile PHP Method

setScriptFile() public method

The entry script file path can normally be determined based on the SCRIPT_FILENAME SERVER variable. However, for some server configurations, this may not be correct or feasible. This setter is provided so that the entry script file path can be manually specified.
public setScriptFile ( string $value )
$value string the entry script file path. This can be either a file path or a path alias.
    public function setScriptFile($value)
    {
        $scriptFile = realpath(Yii::getAlias($value));
        if ($scriptFile !== false && is_file($scriptFile)) {
            $this->_scriptFile = $scriptFile;
        } else {
            throw new InvalidConfigException('Unable to determine the entry script file path.');
        }
    }