gcloud 部署 php 应用程序

gcloud deploy php application

我想上传 运行 我的 php 应用程序到 google 云端,文件夹结构如下:

yaml 文件如下所示:

runtime: php55
api_version: 1

handlers:
- url: /.*
  script: index.php

- url: /css
  static_dir: css

当我部署它时 运行s index.php 文件,但不附加任何 css 或 js 文件。 yaml 文件的结构应该是什么,以便它接受 css 和来自 css 和 js 文件夹的 js 文件?

谢谢

试试这个(处理程序的顺序很重要)

application: <your-app-id-goes-here>
runtime: php55
api_version: 1

handlers:

- url: /css
  static_dir: css

- url: /js
  static_dir: js

- url: /images
  static_dir: images

- url: .*
  script: index.php