为什么我会收到此错误?
遇到 PHP 错误
严重性:通知
消息:未定义的属性:Lib_curl::$lib_parent
文件名:库/lib_curl.php
行号:14
这是我的控制器
public function shoppingcart()
{
$this->load->library(array('curl', 'lib_curl', 'lib_parent'));
if($this->input->post('addtocart', TRUE))
{
$type = $this->input->post('type', TRUE);
$id = $this->input->post('id', TRUE);
$Weight = $this->input->post('Weight', TRUE);
$ASIN = $this->input->post('ASIN', TRUE);
$qty = $this->input->post('qty', TRUE);
if($this->lib_curl->cek_shipping_indous($type,$id,$this->config->item('AWS_ACCESS_KEY_ID'),$this->config->item('AWS_ASSOCIATE_TAG'),$this->config->item('AWS_SECRET_ACCESS_KEY')))
{
//indonesia
}
else
{
//US
}
}
}
这是我的图书馆
public function cek_shipping_indous($tipe,$items,$AWS_ACCESS_KEY_ID,$AWS_ASSOCIATE_TAG,$AWS_SECRET_ACCESS_KEY)
{
$params = array(
'Service' => 'AWSECommerceService',
'AWSAccessKeyId' => $AWS_ACCESS_KEY_ID,
'AssociateTag' => $AWS_ASSOCIATE_TAG,
'Timestamp' => date("Y-m-d\TH:i:s\Z"),
'Operation' => 'CartCreate',
"Item.1.".$tipe."" => $items,
'Item.1.Quantity' => '1',
);
$xml = simplexml_load_file($this->lib_parent->amazon_get_data($params,$AWS_SECRET_ACCESS_KEY));
$this->lib_parent->echo_array($xml);
}
我的代码哪里错了?
谢谢你