Php Amazon MWS致命错误

Php Amazon MWS致命错误,php,api,amazon-web-services,amazon,Php,Api,Amazon Web Services,Amazon,我正在尝试从Amazon获取/下载我的列表,并将其下载到我最近创建的网站。问题是我当前收到此致命错误: Fatal error: Class 'MarketplaceWebServiceProducts_Client' not found in /var/www/html/hello/src/MarketplaceWebServiceProducts/Samples/ListMatchingProductsSample.php on line 53 我经历了一段艰难的时光。这是我的密码: re

我正在尝试从Amazon获取/下载我的列表,并将其下载到我最近创建的网站。问题是我当前收到此致命错误:

Fatal error: Class 'MarketplaceWebServiceProducts_Client' not found in /var/www/html/hello/src/MarketplaceWebServiceProducts/Samples/ListMatchingProductsSample.php on line 53
我经历了一段艰难的时光。这是我的密码:

require_once('config.inc.php');

$serviceUrl = "https://mws.amazonservices.com/Products/2011-10-01";


 $config = array (
   'ServiceURL' => $serviceUrl,
   'ProxyHost' => null,
   'ProxyPort' => -1,
   'ProxyUsername' => null,
   'ProxyPassword' => null,
   'MaxErrorRetry' => 3,
 );

$service = new MarketplaceWebServiceProducts_Client(
    AWS_ACCESS_KEY_ID,
    AWS_SECRET_ACCESS_KEY,
    APPLICATION_NAME,
    APPLICATION_VERSION,
    MERCHANT_ID,
    MARKETPLACE_ID
);

 $request = new MarketplaceWebServiceProducts_Model_ListMatchingProductsRequest();
 $request->setSellerId(A3O22V420SDTFY);
 invokeListMatchingProducts($service, $request);

  function invokeListMatchingProducts(MarketplaceWebServiceProducts_Interface $service, $request)
  {
  try {
    $response = $service->ListMatchingProducts($request);

    echo ("Service Response\n");
    echo ("=============================================================================\n");

    $dom = new DOMDocument();
    $dom->loadXML($response->toXML());
    $dom->preserveWhiteSpace = false;
    $dom->formatOutput = true;
    echo $dom->saveXML();
    echo("ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n");

 } catch (MarketplaceWebServiceProducts_Exception $ex) {
    echo("Caught Exception: " . $ex->getMessage() . "\n");
    echo("Response Status Code: " . $ex->getStatusCode() . "\n");
    echo("Error Code: " . $ex->getErrorCode() . "\n");
    echo("Error Type: " . $ex->getErrorType() . "\n");
    echo("Request ID: " . $ex->getRequestId() . "\n");
    echo("XML: " . $ex->getXML() . "\n");
    echo("ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n");
 }
 }
以下是我在config.inc.php中的代码:

define('AWS_ACCESS_KEY_ID', 'TYPE_YOUR_CREDENTIALS_HERE');
define('AWS_SECRET_ACCESS_KEY', 'TYPE_YOUR_CREDENTIALS_HERE');
define('APPLICATION_NAME', 'TYPE_YOUR_CREDENTIALS_HERE');
define('APPLICATION_VERSION', 'TYPE_YOUR_CREDENTIALS_HERE');
define ('MERCHANT_ID', 'TYPE_YOUR_CREDENTIALS_HERE');
define ('MARKETPLACE_ID', 'TYPE_YOUR_CREDENTIALS_HERE');

set_include_path(get_include_path() . PATH_SEPARATOR . '../../.');

 function __autoload($className){
    $filePath = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
    $includePaths = explode(PATH_SEPARATOR, get_include_path());
    foreach($includePaths as $includePath){
        if(file_exists($includePath . DIRECTORY_SEPARATOR . $filePath)){
            require_once $filePath;
            return;
        }
    }
}

您的
config.inc.php
中有什么内容?目前看来你还没有包含或自动加载访问该类所需的文件。你点击了它,兄弟,我肯定不知道加载什么。