PHP app.yaml,GAE新手,不确定如何设置
我有一个基于Bootstrap3的单页网站,我正试图将其转移到Google应用程序引擎。我使用php构建我的网站,所有的内容都显示出来,但没有样式和javascript。我的网站基本上是建立如下PHP app.yaml,GAE新手,不确定如何设置,php,google-app-engine,app.yaml,Php,Google App Engine,App.yaml,我有一个基于Bootstrap3的单页网站,我正试图将其转移到Google应用程序引擎。我使用php构建我的网站,所有的内容都显示出来,但没有样式和javascript。我的网站基本上是建立如下 _/js/bootstrap.js _/js/custom.js _/字体/glypicon…等 _/css/bootstrap.css _/css/custom.css _/php/。。我所有的php文件都在这里 index.php 有人能帮我设置app.yaml吗?我是GAE的新手,对此有点困惑
- _/js/bootstrap.js
- _/js/custom.js
- _/字体/glypicon…等
- _/css/bootstrap.css
- _/css/custom.css
- _/php/。。我所有的php文件都在这里
- index.php
什么是?这是一个目录吗?是的/是一个目录,我使用它,所以它总是列在顶部。映像位于根目录中名为images/的文件夹中,而不是静态的,所以我在文件中更新了它。但我仍然在浏览器中看到相同的结果。你能直接导航到:?你能粘贴调用js和css文件的html代码吗?我正在本地主机8080上通过SDK运行它,我已经尝试使用直接转到图像,它将我发送到not_found.php。当我回到电脑前时,我会尝试使用js和CSS文件。我发布的代码让你在根url处指定图像。如果您的url使用/images/…,请参阅刚刚添加到代码中的编辑。现在显示的是图像,但仍然没有css或js。
application: myapp # of course, replace with your app name
version: 1
runtime: php
api_version: 1
handlers:
# Serve php scripts.
- url: /(.+\.php)$
script: \1
- url: /
script: index.php
- url: /index\.html
script: index.php
- url: /_/css
static_dir: _/css
- url: /_/js
static_dir: _/js
- url: /_/fonts
static_dir: _/fonts
- url: /images/(.*\.(gif|png|jpg))$
static_files: images/\1 # assuming you put your images in a directory called 'images'
upload: images/.*\.(gif|png|jpg)$
- url: /.*
script: not_found.php # if not_found.php (custom 404 handler) exists. otherwise, just serve index.php