我一直得到這個T_STRING解析錯誤im不知道它是什麼,但它的行34底部,任何幫助表示讚賞。解析錯誤:語法錯誤,意外T_STRING
<form action="product_search">
<input type="text" name="search" value="<? echo htmlentities($_GET['search']); ?>"/>
<input type="submit" value="Search"/>
</form>
<?
$search_items = urlencode($_GET['search']);
// $search_items = 'eee';
$items = simplexml_load_file('http://api.shopping.com/dsp/linkin_id-8005272/keyword-'.$search_items);
if (($items) && (strlen($search_items) > 1)) {
print "<pre>\n";
foreach ($items->result->domain->{domain-listing} as $item) {
print l($item->title, $item->url)."<br/>";
}
print '</pre>';
}
else {
?>
Search for products-- computers, eee pcs, sub-notebooks, and all that great stuff!
<?
}
?>
<?
$tids = explode(',',arg(2));
foreach ($tids as $tid) {
$term_info = taxonomy_get_term($tid);
$search_items = urlencode($term_info->name);
$items = simplexml_load_file('http://publisher.api.shopping.com/publisher/3.0/rest/GeneralSearch?identity.apiKey=[API KEY]&tr.trackingId=[LINKIN ID]&nf.keyword='.$search_items);
if (($items) && (strlen($search_items) > 1)) {
foreach ($items->categories->category->items->offer as $item) {
print '<div style="float: left; width: 120px; padding: 10px; overflow: auto; display: block;">';
//right here is the error
print '<a rel="nofollow" onclick="javascript:_gaq.push(['_trackPageview', '/outgoing/article_exit_link/789591']);" href="'.$item->offerURL.'"><img src="'.$item->imageList->image[0]->sourceURL.'" width="100"></a>';
print "<br/>".l($item->name, $item->offerURL, array(), NULL, NULL, TRUE);
print '</div>';
}
}
}
?>
謝謝工作完美 – 2011-06-16 22:04:46