Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
BigCommerce PHP API未连接_Php_Api_Bigcommerce - Fatal编程技术网

BigCommerce PHP API未连接

BigCommerce PHP API未连接,php,api,bigcommerce,Php,Api,Bigcommerce,我需要了解与Bigcommerce的PHP代码连接,在这段代码中,它有一个输出“StartupMiddle1”,但它无法输出产品。。非常感谢你的帮助。。谢谢 <?php echo "start"; require 'bigcommerce-api-php-master/bigcommerce.php'; use Bigcommerce\Api\Client as Bigcommerce; echo "up"; Bigcommerce::configure(array( 'st

我需要了解与Bigcommerce的PHP代码连接,在这段代码中,它有一个输出“StartupMiddle1”,但它无法输出产品。。非常感谢你的帮助。。谢谢

<?php
echo "start";

require 'bigcommerce-api-php-master/bigcommerce.php';
use Bigcommerce\Api\Client as Bigcommerce;

echo "up";

Bigcommerce::configure(array(
    'store_url' => 'https://store-h9a8oj.mybigcommerce.com/',
    'username' => 'admin',
    'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxx'
    ));

echo "middle";
Bigcommerce::setCipher('RC4-SHA');
Bigcommerce::verifyPeer(false);
echo "middle1";

$products = Bigcommerce::getProducts();
foreach($products as $product) {
echo $product->name;
echo $product->price;
        }
echo "end";
?>


一切都设置正确。确保满足所有要求(PHP5.3+,启用了cUrl扩展),然后重试。还要确保将所有文件从复制到bigcommerce api php master/目录,而不仅仅是“bigcommerce.php”文件。

更改密码,您可以使用rsa_rc4_128_sha而不是rc4-sha

     // Bigcommerce::setCipher('RC4-SHA');
    Bigcommerce::setCipher('rsa_rc4_128_sha');
希望它能起作用:)

感谢和问候,

Alpa W

我使用的是byethost免费托管,我确信它有PHP5.3,但我如何知道它是否启用了curl扩展?还有,我是否必须在bigcommerce.php文件中编辑一些内容?非常感谢乔希!对不起,我有一段时间没登录了。对于curl,您需要从php.ini中的curl扩展中删除分号(应该类似于;extension=C:\php\ext\php\u curl.dll),然后删除前面的分号并重新启动服务器。您不需要向bigcommerce.php添加任何内容。