开发者

A weird result, as a result of this PHP script

require_once 'include/BestBuy/Service/Remix.php';  

$skuid = rawurldecode($_GET['skuid']);  

$apiKey = 'tfvs7h89pwn开发者_如何学C4pzmyj9nxemmg'; // Your API key

$remix  = new BestBuy_Service_Remix($apiKey);  

$result = $remix->product('$skuid','json')  
->show(array('url'))  
->query();  

$data = json_decode ($result, true);  

$feed = $data['url'];  

print <<< FEEDS  
$feed  
FEEDS;  

When I put this script into my page, the $feed will echo the current URL. But when I manually supply the script with an integer, replacing ($skuid) it will be successful. It's really weird, But I think it has something to do with me using a variable in that specific array.

And it is also weird, because It was working before I re arranged some of the HTML.

I'm trying to approach this problem the most logical way.

Please help. Thanks.


should you have $skuid in quotes? I would expect:

$result = $remix->product($skuid,'json') 

rather than

$result = $remix->product('$skuid','json') 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜