Google App Engine .yaml文件在本地运行,但在部署时不运行

时间:2014-07-22 07:24:53

标签: php google-app-engine yaml

我的GAE PHP .yaml文件在本地运行,但在部署时则无效。一切正常,直到我重新组织了我的.php脚本所包含的文件夹。应用根目录中有一个php文件夹,.php进一步组织成文件夹。

当前YAML档案:

application: raven3mil
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: /js
  static_dir: js

- url: /css
  static_dir: css

- url: /images
  static_dir: /static/images


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

- url: /.*
  script: /login.php

error_handlers:
- file: /errors/404.html

文件结构示例:

+root
  +php
    +admin
      manageUsers.php
    +teacher
      lessons.php
    +student
      schedule.php
    dashboard.php
  +css
    index.css
    main.css
  +js
    +jquery
    +bootstrap
  login.php

我不确定为什么我的YAML文件在本地运行但未部署。任何人都可以提供任何见解吗?

1 个答案:

答案 0 :(得分:0)

如果您的脚本使用UIView * container = [[UIView alloc]initWithFrame:CGRectZero]; container.backgroundColor = [UIColor clearColor]; // title text UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 10, 40)]; label.backgroundColor = [UIColor clearColor]; label.text = @"hello world"; label.textColor = [UIColor blackColor]; label.textAlignment = NSTextAlignmentCenter; label.adjustsFontSizeToFitWidth = YES; label.lineBreakMode = NSLineBreakByClipping; label.numberOfLines = 1; [label sizeToFit]; // button UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(label.frame.origin.x, label.frame.size.width, 20, 40); // resize container container.frame = CGRectMake(0, 0, label.frame.size.width + button.frame.size.width, 40); [container addSubview:label]; [container addSubview:button]; self.navigationItem.titleView = container; 中的内容,则需要确保它们可供应用程序使用。

您可以通过向static_dirapplication_readable: truejs处理程序添加css来实现这一目标。

您可以在此处详细了解:https://cloud.google.com/appengine/docs/php/config/appconfig