5.0.0 - 普通 - 未处理
thinkphp\library\think\Loader.php // 获取应用根目录
public static function getRootPath()
{
if ('cli' == PHP_SAPI) {
$scriptName = realpath($_SERVER['argv'][0]);
} else {
$scriptName = $_SERVER['SCRIPT_FILENAME'];
}
$path = realpath(dirname($scriptName));
if (!is_file($path . DIRECTORY_SEPARATOR . 'think')) {
$path = dirname($path);
}
return $path . DIRECTORY_SEPARATOR;
}如果是这种部署目录,就找不到composer安装的类库,报错/tp51/
/tp51/vendor
/public/index.phpindex.phpdefine('APP_PATH', __DIR__ . '/../tp51/application');
require __DIR__ . '/../tp51/thinkphp/base.php';
Container::get('app', [APP_PATH])->run()->send(); 