diff --git a/.gitignore b/.gitignore index 6d538ea9..974885d3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,3 @@ node_modules/* yarn-error.log _ide_helper.php .phpstorm.meta.php -public/ diff --git a/bootstrap/chkenv.php b/bootstrap/chkenv.php index 9d3e9842..1e894040 100644 --- a/bootstrap/chkenv.php +++ b/bootstrap/chkenv.php @@ -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)); })(); diff --git a/public/.gitignore b/public/.gitignore new file mode 100644 index 00000000..203dfa7f --- /dev/null +++ b/public/.gitignore @@ -0,0 +1,2 @@ +app/ +plugins/ diff --git a/index.php b/public/index.php similarity index 52% rename from index.php rename to public/index.php index 812d3d5d..3ce6981e 100755 --- a/index.php +++ b/public/index.php @@ -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';