当我在 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 Forum
但我还没有找到解决这个问题的方法。我该如何解决这个问题?
答案 0 :(得分:0)
是基本的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上运行良好