-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.cmd
49 lines (42 loc) · 1.08 KB
/
run.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@ECHO OFF
::##
:: # @file run.cmd
:: # @brief Starting PHP webserver
:: #
:: # @details Starting a local PHP webserver with root in current directory
:: #
:: # @copyright http://www.gnu.org/licenses/lgpl.txt LGPL version 3
:: # @author Erik Bachmann <[email protected]>
:: # @since 2023-03-13T12:29:14 / erba
:: # @version 2024-11-01T12:17:20
:: ##
:init
ECHO Running PHP webserver for test
SET _PORT=8083
::CALL :04
::CALL :05
CALL :run
:main
:: Get current subdir
FOR %%a IN ("%__CD__%\.") DO SET "currentDir=%%~nxa"
ECHO [%currentDir%]
:: Set window title
TITLE localhost:%_PORT% - [%currentDir%]
:: Star server
php -S localhost:%_PORT%
GOTO :EOF
:run
TITLE %_PORT%
ECHO: Plain
START /B /MIN http://localhost:%_PORT%/index.php
GOTO :EOF
:05
ECHO: v. 05.xx
START /B /MIN http://localhost:%_PORT%/src/.releases/05.00/index.php
::START /B http://localhost:%_PORT%/
GOTO :EOF
:04
:: Start browser
ECHO: v. 04.xx
START /B /MIN http://localhost:%_PORT%/src/
GOTO :EOF