mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Move fixing the SCRIPT_FILENAME from server.php to the SymfonyValetDriver.php
This commit is contained in:
@@ -47,12 +47,17 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
||||
*/
|
||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||
{
|
||||
if (file_exists($frontControllerPath = $sitePath.'/web/app_dev.php')) {
|
||||
return $frontControllerPath;
|
||||
} elseif (file_exists($frontControllerPath = $sitePath.'/web/app.php')) {
|
||||
return $frontControllerPath;
|
||||
} elseif (file_exists($frontControllerPath = $sitePath.'/public/index.php')) {
|
||||
return $frontControllerPath;
|
||||
$frontControllerPath = null;
|
||||
|
||||
if (file_exists($path = $sitePath.'/web/app_dev.php')) {
|
||||
$frontControllerPath = $path;
|
||||
} elseif (file_exists($path = $sitePath.'/web/app.php')) {
|
||||
$frontControllerPath = $path;
|
||||
} elseif (file_exists($path = $sitePath.'/public/index.php')) {
|
||||
$frontControllerPath = $path;
|
||||
}
|
||||
|
||||
$_SERVER['SCRIPT_FILENAME'] = $frontControllerPath;
|
||||
return $frontControllerPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,5 +232,4 @@ function get_valet_site_path($valetConfig, $siteName, $domain)
|
||||
|
||||
chdir(dirname($frontControllerPath));
|
||||
|
||||
$_SERVER['SCRIPT_FILENAME'] = $frontControllerPath;
|
||||
require $frontControllerPath;
|
||||
|
||||
Reference in New Issue
Block a user