【发布时间】:2019-02-15 23:01:32
【问题描述】:
我遇到了一个问题,我将整个文件夹移动到带有供应商文件和所有内容的服务器中,并且它不再加载类,而 localhost/本地副本工作正常。可能是什么问题? 错误代码是不必要的,但我还是要添加它..
致命错误:未捕获的错误:在 /home/user/full/path/of/the/file/where/its/located 中找不到类“Google_Service_Adsense”
文件没有改变,只是移动到服务器中。 Composer 不在服务器中,它是一个托管服务器,因此也无法安装和更新包或 composer。
composer.json:
{ "require": { "google/apiclient": "^2.0", "google/apiclient-services": "^0.68.0" } }
类文件所在的文件路径:
myDirectory\vendor\google\apiclient-services\src\Google\Service\AdSense.php
它实际驻留在 github 存储库中的链接:
https://github.com/google/google-api-php-client-services/blob/master/src/Google/Service/AdSense.php
更新:
从服务器删除整个内容并重新导入后,我收到此错误:
Fatal error: require(): Failed opening required '/home/user/full/path/of/the/file/where/its/located/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:/usr/share/pear') in /home/user/full/path/of/the/file/where/its/located/vendor/composer/autoload_real.php on line 66
第二次更新。再次从服务器中删除包含内容的目录,上传压缩存档,解压缩后,我仍然遇到第一个致命错误。
【问题讨论】:
标签: php class composer-php