diff --git a/.gitignore b/.gitignore index 737e695..0aeca79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/files/ /plugins/ /*.db diff --git a/php-webapp-framework.sh b/php-webapp-framework.sh index ebb9db8..f511f09 100644 --- a/php-webapp-framework.sh +++ b/php-webapp-framework.sh @@ -1,3 +1,8 @@ #!/bin/bash -php -S 0.0.0.0:8080 index.php --enable-mbstring +# https://stackoverflow.com/a/1482133 +SCRIPT_DIR="$(dirname -- "$(readlink -f -- "$0";)";)" +cd "${SCRIPT_DIR}" + +export PHP_CLI_SERVER_WORKERS=4 +php -S 0.0.0.0:$1 index.php --enable-mbstring