dbms_primeidc_init...1
This commit is contained in:
parent
b5714828f2
commit
18f2f469bc
21
extdbms/cli.php
Normal file
21
extdbms/cli.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$command = $argv[1] ?? null;
|
||||
|
||||
switch ($command) {
|
||||
case 'serve':
|
||||
case 'serv': // ← 이 줄 추가
|
||||
$host = '0.0.0.0';
|
||||
$port = '80';
|
||||
$docRoot = __DIR__ . '/public'; // 또는 프레임워크의 public 폴더 경로
|
||||
|
||||
echo "Starting development server at http://$host:$port\n";
|
||||
echo "Document root: $docRoot\n";
|
||||
|
||||
// 실제로 서버 실행
|
||||
passthru("php -S $host:$port -t $docRoot");
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "Usage: php cli.php [serve]\n";
|
||||
break;
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
use lib\Configs\App;
|
||||
|
||||
define("ROOT_PATH", __DIR__);
|
||||
require_once ROOT_PATH . '/vendor/autoload.php';
|
||||
require_once ROOT_PATH . "/lib/Configs/App.php";
|
||||
|
||||
try {
|
||||
$app = new App();
|
||||
$app->run();
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
@ -18,7 +18,7 @@ abstract class App
|
||||
$router->add('GET', '', function ($params) {
|
||||
Response::text("홈 페이지");
|
||||
});
|
||||
require_once ROOT_PATH . '/lib/Configs/Route.php';
|
||||
require_once ROOT_PATH . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "Configs" . DIRECTORY_SEPARATOR . "Route.php";
|
||||
// CLI 요청인지 웹 요청인지에 따라 URI 파싱
|
||||
$uri = php_sapi_name() === 'cli' ? $this->parseCliUri() : $_SERVER['REQUEST_URI'];
|
||||
$method = php_sapi_name() === 'cli' ? 'GET' : $_SERVER['REQUEST_METHOD'];
|
||||
|
||||
14
extdbms/public/index.php
Normal file
14
extdbms/public/index.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use lib\Configs\App;
|
||||
|
||||
define("ROOT_PATH", __DIR__ . DIRECTORY_SEPARATOR . "..");
|
||||
require_once ROOT_PATH . DIRECTORY_SEPARATOR . "vendor" . DIRECTORY_SEPARATOR . "autoload.php";
|
||||
require_once ROOT_PATH . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "Configs" . DIRECTORY_SEPARATOR . "App.php";
|
||||
|
||||
try {
|
||||
$app = new App();
|
||||
$app->run();
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user