开发者

Getting unexpected semicolon error when using PlugNPay PHP Library

开发者 https://www.devze.com 2023-02-05 22:03 出处:网络
When I try to use the third-party PHP library for Plug N Pay (a credit card authorization library), I get the following error:

When I try to use the third-party PHP library for Plug N Pay (a credit card authorization library), I get the following error:

Parse error: syntax error, unexpected ';' in /authtest/PnP.php on line 391

Line 391 reads:

    $http_query 开发者_如何学JAVA= str_replace("&", "&", (http_build_query( $post_args ) );

Removing this line runs the script but obviously returns another error as $http_query is not set. I've replaced the default user/pass with my specific PnP user/pass, for what it's worth.

Googling turns up not much, and this server is running PHP5. Any ideas?


Your are missing a closing ) before the ; and/or have an unnecessary (,
depending on how you look at it.

$http_query = str_replace("&", "&", (http_build_query( $post_args ) ); 

should be

$http_query = str_replace("&", "&", (http_build_query( $post_args ) ) );

or even better

$http_query = str_replace("&", "&", http_build_query( $post_args ) );
0

精彩评论

暂无评论...
验证码 换一张
取 消