解析错误:语法错误、意外T_STRING期待“)”

时间:2021-01-24 22:46:17

I am getting error on my site Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/**/public_html/config.php on line 111

我在我的站点解析错误上出错:语法错误,意外的T_STRING,期望')'在/home/ /public_html/config中。php在第111行

My PHP code in FROM line 107 TO 112 is:

从第107行到第112行,我的PHP代码是:

 //PayPal Settings
$config [ 'paypal' ] = array(
'url' => ' https://www.paypal.com/cgi-bin/webscr ' , //url na koeto da prashta formata
'business' => 'http://startmarketplace.com/themeforestclone-demo/, / Your PayPal ID or an email address
' currency ' => ' USD ' //valuta v koqto e cenata EUR, USD etc.
);

Start line is 107. Last line is line 112.

开始线是107。最后一行是第112行。

Line on which I am getting error is (111) is: ' currency ' => ' USD ' //valuta v koqto e cenata EUR, USD etc

我得到错误的线(111)是:“货币”= >“美元”/ /币值v koqto e cenata欧元,美元等

Plz help.. Thanks :)

请帮助. .谢谢:)

2 个解决方案

#1


5  

This code should work:

这段代码应该工作:

<?php
//PayPal Settings
$config [ 'paypal' ] = array(
    'url'       => ' https://www.paypal.com/cgi-bin/webscr ' , //url na koeto da prashta formata
    'business'  => 'http://startmarketplace.com/themeforestclone-demo/', // Your PayPal ID or an email address
    'currency'  => ' USD ' //valuta v koqto e cenata EUR, USD etc.
);
?>

You simply forgot to add a quote ( ' ) to the "business" key in the $config array.

您只是忘记向$config数组中的“业务”键添加引号(')。

#2


0  

 //PayPal Settings
$config['paypal'] = array(
  'url' => 'https://www.paypal.com/cgi-bin/webscr', 
  'business' => 'http://startmarketplace.com/themeforestclone-demo/', 
  'currency' => 'USD',
);

#1


5  

This code should work:

这段代码应该工作:

<?php
//PayPal Settings
$config [ 'paypal' ] = array(
    'url'       => ' https://www.paypal.com/cgi-bin/webscr ' , //url na koeto da prashta formata
    'business'  => 'http://startmarketplace.com/themeforestclone-demo/', // Your PayPal ID or an email address
    'currency'  => ' USD ' //valuta v koqto e cenata EUR, USD etc.
);
?>

You simply forgot to add a quote ( ' ) to the "business" key in the $config array.

您只是忘记向$config数组中的“业务”键添加引号(')。

#2


0  

 //PayPal Settings
$config['paypal'] = array(
  'url' => 'https://www.paypal.com/cgi-bin/webscr', 
  'business' => 'http://startmarketplace.com/themeforestclone-demo/', 
  'currency' => 'USD',
);