Added support for legacy scripts via CGI mode instead of CLI SAPI

This commit is contained in:
Gregory Magarshak
2026-07-21 08:39:07 -04:00
parent dce9b9660a
commit 5983f11b91
6 changed files with 559 additions and 65 deletions
+3
View File
@@ -110,6 +110,9 @@ if (!$webDir || !is_dir($webDir)) {
// Initialize Q with the project root (parent of web/)
// This sets up autoloading from classes/ and handlers from handlers/
$projectRoot = dirname($webDir);
if (!defined('APP_DIR')) {
define('APP_DIR', $projectRoot);
}
Q::init($projectRoot);
// Load .env file if present (sets $_ENV and getenv())