0

当我在PHP 5.3.8上使用jCart库时,我发现了这样的错误

Notice: Undefined index: jcart in D:\Website\JCART\jcart\jcart.php on line 588

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166

Notice: Undefined variable: config in D:\Website\JCART\jcart\config-loader.php on line 13

Notice: Undefined index: text in D:\Website\JCART\jcart\config-loader.php on line 14

Notice: Undefined index: singleItem in D:\Website\JCART\jcart\config-loader.php on line 15

Notice: Undefined index: multipleItems in D:\Website\JCART\jcart\config-loader.php on line 16

Notice: Undefined index: subtotal in D:\Website\JCART\jcart\config-loader.php on line 17

Notice: Undefined index: update in D:\Website\JCART\jcart\config-loader.php on line 18

Notice: Undefined index: checkout in D:\Website\JCART\jcart\config-loader.php on line 19

Notice: Undefined index: checkoutPaypal in D:\Website\JCART\jcart\config-loader.php on line 20

Notice: Undefined index: removeLink in D:\Website\JCART\jcart\config-loader.php on line 21

Notice: Undefined index: emptyButton in D:\Website\JCART\jcart\config-loader.php on line 22

Notice: Undefined index: emptyMessage in D:\Website\JCART\jcart\config-loader.php on line 23

Notice: Undefined index: itemAdded in D:\Website\JCART\jcart\config-loader.php on line 24

Notice: Undefined index: priceError in D:\Website\JCART\jcart\config-loader.php on line 25

Notice: Undefined index: quantityError in D:\Website\JCART\jcart\config-loader.php on line 26

Notice: Undefined index: checkoutError in D:\Website\JCART\jcart\config-loader.php on line 27

Notice: A session had already been started - ignoring session_start() in D:\Website\JCART\index.php on line 4

我已经尝试过这个论坛的解决方案:jCart 论坛

但是我还没有找到解决这个问题的方法。我该如何解决这个问题?

4

1 回答 1

0

tos 是基本的 php 变量设置 - 在所有 $config 变量前面放置一个 @ 符号,它们应该消失 - 或者用 isset 替换,但 @ 符号更容易:即

if(!$config... 

change to:

if(!@$config...

也可以改变

$config to @$config - use the error msgs to locate file and line number ;)

顺便说一句,这在 xampp 上不起作用-但由于某些奇怪的原因在 wamp 和 linux 上很好

于 2014-02-05T15:36:49.393 回答