在本地找到AppEngine类但在部署时找不到

时间:2017-11-23 15:50:43

标签: php google-app-engine google-app-engine-php google-app-engine-launch

出于某种原因,这完全适用于我的本地开发服务器,但当我将其部署到谷歌时,我收到以下错误:

  

PHP致命错误:第10行的/base/data/home/apps/../2.105209891175321430/library/testerson.php中找不到类'PHPOnCouch \ couchClient'

有谁知道为什么我不会在本地与部署上遇到冲突的错误?

这是我的文件夹结构:

project folder
- app.yaml
- library/
- vendor/
- index.php

/library/testerson.php

<?php
    namespace testerson;
    use PHPOnCouch\couchClient as couchClient;

    class Testerson {

        public function __construct()
        {
            $this->CLOUDANT_URL = "https://user:pass@url.cloudant.com";
            $this->global_client = new couchClient($this->CLOUDANT_URL, 'global');
        }

    }
?>

的index.php

<?php
    require_once("vendor/autoload.php");
    require_once("library/testerson.php");

    use testerson\Testerson;

    $account = new Testerson();
?>

1 个答案:

答案 0 :(得分:0)

作为一个疯狂的猜测,您是否复制了onDestroy()条款中包含app.yaml的某人test*