This app demonstrates how to implement a simple front controller for legacy
projects. The main code sample is in index.php
. This is one
example of a front controller. See here for more examples:
- front controller implementation using the Slim Framework
- front controller implementation for WordPress
- front controller implementation using regular expressions
- Install the Google Cloud SDK.
You can run the sample locally using PHP's build-in web server:
# Run PHP's built-in web server
php -S localhost:8000
Browse to localhost:8000
to see a list of examples to execute.
Deploy the samples by doing the following:
gcloud config set project YOUR_PROJECT_ID
gcloud app deploy
gcloud app browse
The last command will open https://{YOUR_PROJECT_ID}.appspot.com/
in your browser. Browse to /
to see a list of examples to execute.