私はGAEを使用して開発しています。私はクラウドでアプリケーションをデプロイするときに問題に直面しています。PHP GAINのYaml構造
>エラー:見つからないこのサーバーでは、要求されたURL /が見つかりませんでした。
私のapp.yamlファイルには、私のファイルの構造がある
application: xxxx
version: 3
runtime: php55
api_version: 1
threadsafe: yes
env_variables:
# Replace project, instance, database, user and password with the values obtained
# when configuring your Cloud SQL instance.
MYSQL_DSN: mysql:unix_socket=/cloudsql/xxxxx
MYSQL_USER: xxx
MYSQL_PASSWORD: 'xxxx'
handlers:
- url: /admin/js
static_dir: admin/js
- url: /js
static_dir: js
- url: /fonts/(.*\.otf)
static_dir: fonts/\1
mime_type: application/x-font-otf
- url: /css
static_dir: css
- url: /admin/css
static_dir: admin/css
- url: /admin/font-awesome
static_dir: admin/font-awesome/\1
mime_type: application/x-font-otf
- url: /admin/fonts
static_dir: admin/fonts
mime_type: application/x-font-otf
- url: /admin/images
static_dir: admin/images
- url: /includes/js
static_dir: /includes/js
- url: /(.+\.php)$
script: \1
- url: /.*
script: index.php
であり、これは私がthis話題を追っ
成功しようとしていますものです。
私のindex.phpコード
<?php require_once("admin/includes/Db_object.php") ?>
<?php require_once("admin/includes/init.php")?>
<?php include("includes/header.php"); ?>
<?php $photos = Photo::find_all();?>
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-12">
<div class="thumbnails row">
<?php foreach ($photos as $photo): ?>
<div class="col-md-4">
<a class = "thumbnail" href="#" data-toggle="lightbox" >
<img class="img-responsive home_page_photo" src="admin/<?php echo $photo->picture_path();?>" alt="" ></a>
</div>
<?php endforeach;?>
</div>
</div>
<!-- /.row -->
<?php include("includes/footer.php"); ?>
EDIT:これは私のログファイルからの誤差である私はそれを展開
PHP Warning: require_once(C:/Users/xxx/Desktop/MyGallery/admin/includes/new_config.php): failed to open stream: No such file or directory in /base/data/home/apps/s~my-project-test-150523/1.397682853077463759/admin/includes/init.php on line 10
18:30:31.878
PHP Fatal error: require_once(): Failed opening required 'C:/Users/xxx/Desktop/MyGallery/admin/includes/new_config.php' (include_path='.;/base/data/home/apps/s~my-project-test-150523/1.397682853077463759/;/base/data/home/runtimes/php/sdk') in /base/data/home/apps/s~my-project-test-150523/1.397682853077463759/admin/includes/init.php on line 10
あなたが私に言ったようにハンドラを変更し、ローカルで完璧に動作します! (上記の私の新しいapp.yamlを参照してください)。私はそれを展開するとき、私は同じエラーがありますが、私は説明しました....あなたのレスポンに感謝します! –
デベロッパーコンソール(https://console.cloud.google.com/logs)のアプリのリクエストログを確認し、404エラーの原因となったリクエストを探します。あなたの 'index.php'で参照されている他の要素が見つからない可能性があります。他のエラーも関連している可能性があります。 –
私のログファイルを見て、それは台無しです!私はあなたの外観を見てみたい場合は何か新しい質問を編集します –