✏️ 编辑:index.php
路径:
/home/boguraj1/.trash/public/index.php
大小:1.85 KB · 修改:2026-07-23 16:13:46 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php use Illuminate\Contracts\Http\Kernel; use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- | Detect Application Root |-------------------------------------------------------------------------- | Dev (XAMPP): project root is one level above public/ | Live (cPanel): project folder "ecommerce" sits beside public_html/ |-------------------------------------------------------------------------- */ if (file_exists(__DIR__ . '/../vendor/autoload.php')) { // Local / dev — standard Laravel structure define('APP_ROOT', realpath(__DIR__ . '/..')); } elseif (file_exists(__DIR__ . '/../ecommerce/vendor/autoload.php')) { // cPanel — ecommerce/ folder is beside public_html/ define('APP_ROOT', realpath(__DIR__ . '/../ecommerce')); } else { http_response_code(503); die('<h2>Application Error</h2><p>Laravel root not found. Please check installation.</p>'); } /* |-------------------------------------------------------------------------- | Maintenance Mode |-------------------------------------------------------------------------- */ if (file_exists($maintenance = APP_ROOT . '/storage/framework/maintenance.php')) { require $maintenance; } /* |-------------------------------------------------------------------------- | Register The Auto Loader |-------------------------------------------------------------------------- */ require APP_ROOT . '/vendor/autoload.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- */ $app = require_once APP_ROOT . '/bootstrap/app.php'; $kernel = $app->make(Kernel::class); $response = $kernel->handle( $request = Request::capture() )->send(); $kernel->terminate($request, $response);
💾 保存
取消
保存为 UTF-8,换行统一为 LF