我有一个名为“test-my-app1”的文件夹,其中包含我用于 google 应用引擎的应用。该文件夹中有一个名为img的文件夹,用于存储我的应用程序 CSS 的所有图像,还有一个名为profile的文件夹。在名为 profile ( test-my-app1/img/profile/ ) 的文件夹中,用户可以为他的个人资料图片上传照片。
我使用的 php 脚本成功地适用于我笔记本电脑中的 XAMPP。问题是当我在应用引擎中运行脚本时,图像没有上传到我的文件夹“配置文件”中。这是我的应用程序 yaml 文件:
application: test-my-app1
version: 1
runtime: php
api_version: 1
handlers:
- url: /img
static_dir: img
- url: /profile/(.*\.(gif|png|jpg))
static_files: profile/\1
upload: profile/(.*\.(gif|png|jpg))
知道如何解决吗?这里有一个可能的答案:App Engine PHP upload file for my question但没有解决我的问题