繁体   English   中英

Google App Engine PHP灵活环境中的网址处理程序

[英]URL Handlers in Google App Engine PHP Flexible enviroment

我已经在Google App Engine中将PHP项目部署为Flexible Environment,我想要的是拥有一个自定义URL,以便用户可以按

www.example.com/user

必须指向

www.example.com/core/userProfile/user.php

我已将app.yaml更改为此,但无法使其正常工作

runtime: php
env: flex
service: api 
api_version: 1
threadsafe: true

resources:
  cpu: 1
  memory_gb: 1
  disk_size_gb: 10

# Starting Point
runtime_config:
  document_root: '.'

# Routers
handlers:
- url: /test.php
  script: /test.php

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

- url: /user
  script: core/userProfile/user.php

任何网址都会产生以下结果

Error: Not Found
The requested URL /user was not found on this server.

您的app.yaml配置将标准环境Handlers元素混合到一个灵活的环境配置中 ,因此它可能会被忽略。 某种程度上相关: 如何判断Google App Engine文档页面适用于标准环境还是灵活环境

您需要处理Flex应用程序内部的URL路由,请参阅App Engine灵活环境中的PHP快速入门

暂无
暂无

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

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