出于某种原因,这在我的本地开发服务器上完美运行,但是当我将它部署到谷歌时,我收到以下错误:
PHP 致命错误:在第 10 行的 /base/data/home/apps/../2.105209891175321430/library/testerson.php 中找不到类 'PHPOnCouch\couchClient'
有谁知道为什么我不会在本地与部署中遇到冲突的错误?
这是我的文件夹结构:
project folder
- app.yaml
- library/
- vendor/
- index.php
/库/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();
?>