Move entrypoint to "public" dir

This commit is contained in:
Pig Fang 2018-10-19 21:32:15 +08:00
parent 61f657a197
commit ca7c7087ff
4 changed files with 7 additions and 6 deletions

1
.gitignore vendored
View File

@ -12,4 +12,3 @@ node_modules/*
yarn-error.log
_ide_helper.php
.phpstorm.meta.php
public/

View File

@ -60,8 +60,8 @@
}
}
$autoload = file_get_contents('vendor/autoload.php');
$autoload = file_get_contents(__DIR__ . '/../vendor/autoload.php');
$lines = explode("\n", $autoload);
$lines[1] = '$GLOBALS["env_checked"] = true;';
file_put_contents('vendor/autoload.php', implode("\n", $lines));
file_put_contents(__DIR__ . '/../vendor/autoload.php', implode("\n", $lines));
})();

2
public/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
app/
plugins/

View File

@ -9,9 +9,9 @@
@ini_set('display_errors', 'on');
require __DIR__.'/bootstrap/autoload.php';
require __DIR__.'/../bootstrap/autoload.php';
if (!isset($GLOBALS['env_checked'])) require __DIR__.'/bootstrap/chkenv.php';
if (!isset($GLOBALS['env_checked'])) require __DIR__.'/../bootstrap/chkenv.php';
// Process the request
require __DIR__.'/bootstrap/kernel.php';
require __DIR__.'/../bootstrap/kernel.php';