To setup your development environment:
app.yaml
file (your app config)
images
directory and a single PHP called on access of any URLapplication
item is the application ID in App Engineapplication: helloworld-php version: 1 runtime: php api_version: 1 handlers: - url: /images static_dir: images - url: /.* script: index.php
app.yaml
<? print('<p>Hello GAE-PHP world!</p>'); if (time() % 2 == 0) { print('<p>You visited on an even-numbered second since epoch</p>'); } else { print('<p>You visited on an odd-numbered second since epoch</p>'); } ?>
dev_appserver.py --php_executable_path=<path to php-cgi> <path to application directory>
if (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) { // Set to the CloudSQL Host spec } else { // Set to localhost }
app.yaml
appcfg.py update <path to application directory>
Useful links: