-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved PHP8.1 support Improved server.bat
- Loading branch information
1 parent
84e7426
commit df185e7
Showing
4 changed files
with
126 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
@echo off | ||
|
||
:: Setup PHP and PORT | ||
set PHP_BIN="C:\php\php.exe" | ||
set PHP_INI="C:\php\php.ini" | ||
set HOST_HOST=localhost | ||
set HOST_PORT=9000 | ||
|
||
:: Current path | ||
set CURRENT_PATH=%~dp0 | ||
set CURRENT_PATH=%CURRENT_PATH:~0,-1% | ||
|
||
:: Router path | ||
set ROUTER="%CURRENT_PATH%\index.php" | ||
|
||
:: Start built in server | ||
%PHP_BIN% -S "%HOST_HOST%:%HOST_PORT%" -c %PHP_INI% -t "%CURRENT_PATH%" %ROUTER% | ||
|
||
:: Prevent close if PHP failed to start | ||
pause | ||
@echo off | ||
|
||
:: Setup PHP and PORT | ||
set PHP_BIN="C:\php\php.exe" | ||
set PHP_INI="C:\php\php.ini" | ||
set HOST_HOST=localhost | ||
set HOST_PORT=9000 | ||
|
||
:: Current path | ||
set CURRENT_PATH=%~dp0 | ||
set CURRENT_PATH=%CURRENT_PATH:~0,-1% | ||
|
||
:: Router path | ||
set ROUTER="%CURRENT_PATH%\index.php" | ||
|
||
if not exist %PHP_BIN% ( | ||
echo ERROR: %PHP_BIN% not found | ||
pause | ||
) else if not exist %PHP_INI% ( | ||
echo ERROR: %PHP_INI% not found | ||
pause | ||
) else ( | ||
:: Start built in server | ||
%PHP_BIN% -S "%HOST_HOST%:%HOST_PORT%" -c %PHP_INI% -t "%CURRENT_PATH%" %ROUTER% || pause | ||
) |
Oops, something went wrong.