0

为什么我收到以下错误

警告:SoapClient::__doRequest(): Unable to find the wrapper "https" - 你在配置 PHP 时是否忘记启用它

我的错误是什么?

我的代码如下

$config = parse_ini_file('ebay.ini', true);
$site = $config['settings']['site'];
$compatibilityLevel = $config['settings']['compatibilityLevel'];

$dev = $config[$site]['devId'];
$app = $config[$site]['appId'];
$cert = $config[$site]['cert'];
$token = $config[$site]['authToken'];
$location = $config[$site]['gatewaySOAP'];

// Create and configure session
$session = new eBaySession($dev, $app, $cert);
$session->token = $token;
$session->site = 203; // 0 = US;
$session->location = $location;

// Make an AddItem API call and print Listing Fee and ItemID
try {

    $client = new eBaySOAP($session);

    $PrimaryCategory = array('CategoryID' => 357);

    $Item = array('ListingType' => 'Chinese',
                  'Currency' => 'INR',
                  'Country' => 'US',
                  'PaymentMethods' => 'PaymentSeeDescription',
                  'RegionID' => 0,
                  'ListingDuration' => 'Days_3',
                  'Title' => 'The new item',
                  'Description' => "It's a great new item",
                  'Location' => "San Jose, CA",
                  'Quantity' => 1,
                  'StartPrice' => 24.99,
                  'PrimaryCategory' => $PrimaryCategory,
                 );

    $params = array('Version' => $compatibilityLevel, 'Item' => $Item);
    $results = $client->AddItem($params);

    // The $results->Fees['ListingFee'] syntax is a result of SOAP classmapping
    print "Listing fee is: " . $results->Fees['ListingFee'] . " <br> \n";

    print "Listed Item ID: " . $results->ItemID . " <br> \n";

    print "Item was listed for the user associated with the auth token code       herer>\n";`enter code here`

} catch (SOAPFault $f) {
    print $f; // error handling
}

在此先感谢穆拉利

4

1 回答 1

2

您必须添加(或取消注释) extension=php_openssl.dll; 到您的 php.ini 文件。

于 2013-09-20T17:54:06.970 回答