0

我有一个基于 bootstrap 3 构建的单页网站,我正在尝试迁移到 Google Apps Engine。我使用 php 搭建我的网站,所有内容都显示,但不显示样式和 javascript。我的网站基本设置如下

  • _/js/bootstrap.js
  • _/js/custom.js
  • _/字体/glypicon ...等
  • _/css/bootstrap.css
  • _/css/custom.css
  • _/php/ .. 我所有的 php 文件都放在这里...
  • 索引.php

有人可以帮我为此设置我的 app.yaml 吗?我是GAE的新手,对此有点困惑。

4

1 回答 1

1

来自:https ://developers.google.com/appengine/docs/php/config/appconfig

application: myapp     # of course, replace with your app name
version: 1
runtime: php
api_version: 1

handlers:

# Serve php scripts.
- url: /(.+\.php)$
  script: \1

- url: /
  script: index.php

- url: /index\.html
  script: index.php

- url: /_/css
  static_dir: _/css

- url: /_/js
  static_dir: _/js

- url: /_/fonts
  static_dir: _/fonts

- url: /images/(.*\.(gif|png|jpg))$
  static_files: images/\1    # assuming you put your images in a directory called 'images'
  upload: images/.*\.(gif|png|jpg)$

- url: /.*
  script: not_found.php    # if not_found.php (custom 404 handler) exists.  otherwise, just serve index.php
于 2014-06-04T18:20:51.540 回答