Fix root detection #798
This commit is contained in:
@@ -1,26 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* phpVMS
|
||||
* phpVMS Entry Point
|
||||
* https://phpvms.net
|
||||
* https://docs.phpvms.net
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE!!
|
||||
*
|
||||
* If you move the public folder, or all the files in the public folder,
|
||||
* be sure to change this to point to the right place. View these docs:
|
||||
*
|
||||
* https://docs.phpvms.net/installation/installation
|
||||
* https://docs.phpvms.net/installation/uploading
|
||||
*/
|
||||
$path_to_phpvms_folder = __DIR__.'/../';
|
||||
if (file_exists($path_to_phpvms_folder.'/bootstrap/autoload.php')) {
|
||||
require $path_to_phpvms_folder.'/bootstrap/autoload.php';
|
||||
if (file_exists($path_to_phpvms_folder.'bootstrap/autoload.php')) {
|
||||
require $path_to_phpvms_folder.'bootstrap/autoload.php';
|
||||
$app = require_once $path_to_phpvms_folder.'bootstrap/app.php';
|
||||
}
|
||||
|
||||
// Look up one more folder up (outside of the Laravel root) and in the `phpvms` subfolder
|
||||
elseif (file_exists($path_to_phpvms_folder.'/../phpvms/bootstrap/autoload.php')) {
|
||||
require $path_to_phpvms_folder.'/../phpvms/bootstrap/autoload.php';
|
||||
elseif (file_exists($path_to_phpvms_folder.'../phpvms/bootstrap/autoload.php')) {
|
||||
require $path_to_phpvms_folder.'../phpvms/bootstrap/autoload.php';
|
||||
$app = require_once $path_to_phpvms_folder.'../phpvms/bootstrap/app.php';
|
||||
}
|
||||
|
||||
// Bail out
|
||||
else {
|
||||
echo 'Cannot find path to bootstrap/autoload.php. Modify this file to the proper path';
|
||||
exit();
|
||||
}
|
||||
|
||||
$app = require_once $path_to_phpvms_folder.'/bootstrap/app.php';
|
||||
$app->setPublicPath(__DIR__);
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
Reference in New Issue
Block a user