简体   繁体   English

gcloud部署php应用程序

[英]gcloud deploy php application

I want to upload and run my php application on google cloud with the following folder structure: 我想在谷歌云上上传和运行我的php应用程序,具有以下文件夹结构:

在此输入图像描述

The yaml file looks like below: yaml文件如下所示:

runtime: php55
api_version: 1

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

- url: /css
  static_dir: css

When I deploy it runs the index.php file, but does not attach any css or js file. 当我部署它时运行index.php文件,但不附加任何css或js文件。 What should be the structure of yaml file so that it accepts css and js files from css and js folder ? 什么应该是yaml文件的结构,以便它接受来自css和js文件夹的css和js文件?

Thanks 谢谢

Try this (the order of handlers is important) 试试这个(处理程序的顺序很重要)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM