2008-12-11 36 views
0

我有一個mysql數據庫設置爲utf-8,csv數據集設置爲utf-8,用分號分隔,並用雙引號括起來。Unicode編程問題,php輸出原始碼

當從數據庫執行直接轉儲時,數據似乎很好地導入。 但是,當試圖通過PHP回顯包含html的字段之一時,顯示部分html代碼而不是鏈接文本。 Firefox將該頁面視爲utf-8,所以這不是問題。

這是一個記錄的直接轉儲,其中包含我試圖輸出的html字段。看起來html也許沒有正確完成。

ARTICLE_NO ARTICLE_NAME SUBTITLE CURRENT_BID START_PRICE BID_COUNT QUANT_TOTAL QUANT_SOLD ACCESSSTARTS ACCESSENDS ACCESSORIGIN_END USERNAME BEST_BIDDER_ID FINISHED WATCH BUYITNOW_PRICE PIC_URL PRIVATE_AUCTION AUCTION_TYPE ACCESSINSERT_DATE ACCESSUPDATE_DATE CATEGORY CATPATH ARTICLE_DESC COUNTRYCODE LOCATION CONDITIONS REVISED PAYPAL_ACCEPT PRE_TERMINATED SHIPPING_TO FEE_INSERTION FEE_FINAL FEE_LISTING PIC_XXL PIC_DIASHOW PIC_COUNT ITEM_SITE_ID STARTS ENDS ORIGIN_END 
220288560247 Ed Hardy Herren Shirt Rock & Roll Weiss XXL Neu & OVP  0.00 49.00 0 1 0 1.10.2008 16:22:09 6.10.2008 16:22:09 6.10.2008 16:22:09 fashionticker1 0 1 0 59.00 http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/13895964e.jpg 0 1 6.10.2008 16:21:47 6.10.2008 16:28:31 32315 0 <!-- +++++++++++++++++++++++++ Bitte ändern Sie im eigenen Interesse nichts an diesem Code! ++++++++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ Das kann massive Feggggggghldarstellungen ihrer Auktion zur Folge haben! +++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ ++++++++++++++++++++++++++ Ihr Supreme Team +++++++++++++++++++++++++++++++++++++++++ -->\n\t\n<br>\n<br>\n<style type="text/css">\n<!--\n#doc {\n height: 577px;\n width: 989px;\n position: relative;\n top: 10px;\n left: 0px;\n background-color: #ffffff;\n border: 1px solid #CCCCCC;\n z-index:1;\n margin: 0px;\n padding: 0px;\n clear: none;\n float: none;\n}\n#doc2 {\n line-height: 30px;\n width: 989px;\n position: relative;\n top: 10px;\n left: 20px;\n background-color: #ffffff;\n margin: 0px;\n padding: 0px;\n clear: none;\n float: none;\n font-family: Arial, Helvetica, sans-serif;\n text-align: left;\n font-size: 11px;\n}\n#flash:before {\n height: 575px;\n width: 987px;\n position: relative;\n top: -273px;\n left: 0px;\n z-index: 3;\n visibility: visible;\n margin: 0px;\n padding: 0px;\n clear: none;\n float: none;\n}\n#flash{\n height: 575px;\n width: 987px;\n position: absolute;\n top: 0px;\n left: 0px;\n z-index: 3;\n visibility: visible;\n margin: 0px;\n padding: 0px;\n clear: none;\n float: none;\n}\n#pannel{\n float: left;\n height: 360px;\n width: 687px;\n background-image: url(http://storage.supremeauction.com/flash/html/pic/panel2.jpg);\n background-repeat: no-repeat;\n padding: 0px;\n position: relative;\n top: 80px;\n left: 150px;\n}\n#imageholder {\n float: left;\n height: 200px;\n width: 232px;\n padding: 0px;\n margin: 0px;\n background-color: #CCCCCC;\n position: relative;\n top: 4px;\n left: 29px;\n}\n#textfield {\n\tfloat: right;\n\tmargin: 0px;\n\tposition: relative;\n\ttop: 4px;\n\tright: 44px;\n\tpadding:5px; \n\toverflow:hidden;\n\theight: 256px;\n\twidth: 356px;\n\tborder: 1px solid #CCCCCC;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tcolor: #333333;\n}\n#headline{\n float: left;\n height: 40px;\n width: 610px;\n position: relative;\n top: 20px;\n left: 30px;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 12pt;\n font-weight: bolder;\n color: #B50000;\n}\n\n#wrapper {\n\twidth: 100%;\n \n.clear {\n clear:both;\n}\n-->\n</style>\n<!--[if IE]>\n<style type="text/css">\n\t#textfield {\n\t\ttop: 4px;\n\t\tright: 44px;\n\t\theight: 275px;\n\t\twidth: 365px;\n\t\toverflow:auto;\n\t}\n</style>\n<![endif]-->\n\n<!-- +++++++++++++++++++++++++ Bitte ändern Sie im eigenen Interesse nichts an diesem Code! ++++++++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ Das kann massive Fehldarstellungen ihrer Auktion zur Folge haben! +++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ ++++++++++++++++++++++++++ Ihr Supreme Team +++++++++++++++++++++++++++++++++++++++++ -->\n<!-- image1eWidth.intValue(): 235 --- image1eHeight.intValue(): 300 --&&-- height="200"\t -->\n\t\n<center>\n<div id="wrapper">\n<div id="doc">\n\t<div id="pannel">\n\t\t<div id="headline">Ed Hardy Herren Shirt Rock & Roll Weiss XXL Neu & OVP</div>\n\t\t<div class="clear"></div>\n\t\t<div id="imageholder"><table width="232" height="200" border="0" cellpadding="0" cellspacing="0" margin="0">\n\t\t <tr align="center" valign="middle">\n\t\t\t<td>\n\t\t\t\t<img src="http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/13895964e.jpg" \n\t\t\t\t\t height="200" \n\t\t\t\t\t border="0" align="middle"/>\n\t\t\t</td>\n\t\t </tr></table></div>\n\t\t<div id="textfield"><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Zur Auktion steht ein Exklusives ED HARDY Herren T-Shirt in weißer Farbe, orginalverpackt und mit Etikett in der Größe XXL.</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Das Shirt hat auf der Brust den Schriftzug &quot;Rock &amp; Roll Lives&quot; in Orange und Gelb besetzt mit Strass Steinen. </FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Auf dem Rücken ist wie auf dem Foto zu erkennen eine hochwertiger Aufdruck mit dem Schriftzug &quot;Beast of Burden&quot; in Gelb gedruckt.</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Ich wünsche Ihnen viel Spaß beim steigern und bitte beachten</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Sie auch meine anderen Angebote in Ebay!!</FONT></P> <br><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">100% Orginal</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Top Qualität zu Top Preisen</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Hochwertigste Materialien</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Aufwendige Stickerein</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Top Verarbeitung</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Exklusivität Pur</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"></P> <br><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Der Versand erfolgt mit der Deutschen Post. </FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Preise für EU Länder auf Anfrage</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Falls mehrere Produkte gekauft werden fallen nur einmal Versandkosten an!!!! </FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="+0">Bitte per Mail vorher mitteilen</FONT></P> <br> <br><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Allgemeinen Geschäfts- und Lieferbedingungen (AGB)</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Diese AGBs gelten für alle Internet- Bestellungen und Auktionen:</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Anwendungsbereich:</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Für Verträge gelten ausschließlich diese Geschäftsbedingungen. Abweichenden Regelungen wird widersprochen. Andere als die hierin enthaltenen Regelungen werden nur mit unserer ausdrücklichen schriftlichen Anerkennung wirksam. Die gelieferte Ware bleibt bis zur vollständigen Bezahlung Eigentum des Verkäufers.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Auktionsende:</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Nach Ende der Auktion erhält der Höchst bietende von uns eine email mit der Kaufbestätigung und den AGB.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Bitte beachten Sie hierzu dringend, dass Ihre bei eBay hinterlegte email-Adresse aktuell ist, damit Sie sämtliche Informationen zur Kaufabwicklung erhalten.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Zahlungsbedingungen:</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Die Zahlung muss innerhalb von 7 Werktagen eingegangen sein. Ansonsten, stelle wir die Ware wieder ein und wir müssen dann leider eine Meldung bei eBay abgeben. Kann die Zahlung nicht rechtzeitig erfolgen, bitten wir um eine kurze Mail.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Lieferungs- und Versandbedingungen:</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Lieferung der bestellten Ware nur nach vorheriger Bezahlung per Ãœberweisung, PayPal oder Nachname. Lieferung und Versand, nach Eingang des kompletten Betrages innerhalb des nächsten Werktages. Versandkosten siehe Artikelbeschreibung. Bitte die gewünschte Versandart angeben. Bei Mehrfach auktionen Sammellieferung möglich.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Impressum</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Robert Wehowski</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Lange str. 72</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">76530 Baden-Baden</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">[email protected]</FONT></P><P ALIGN="LEFT"></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Mit der Abgabe Ihres Gebotes geben Sie sich mit den Geschäftsbedingungen einverstanden.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Widerrufsbelehrung</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Widerrufsrecht</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Sie können Ihre Vertragserklärung innerhalb von einem Monat ohne Angabe von Gründen in Textform (z. B. Brief, Fax, E-Mail) oder - wenn Ihnen die Sache vor Fristablauf überlassen wird - durch Rücksendung der Sache widerrufen. Die Frist beginnt nach Erhalt dieser Belehrung in Textform, jedoch nicht vor Eingang der Ware beim Empfänger (bei der wiederkehrenden Lieferung gleichartiger Waren nicht vor Eingang der ersten Teillieferung) und auch nicht vor Erfüllung unserer Informationspflichten gemäß § 312c Abs. 2 BGB in Verbindung mit § 1 Abs. 1, 2 und 4 BGB-InfoV sowie unserer Pflichten gemäß § 312e Abs. 1 Satz 1 BGB in Verbindung mit § 3 BGB-InfoV. Zur Wahrung der Widerrufsfrist genügt die rechtzeitige Absendung des Widerrufs oder der Sache.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Der Widerruf ist zu richten an:</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Robert Wehowski</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Lange str. 72</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">76530 Baden-Baden</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">email: [email protected]</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Widerrufsfolgen</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Im Falle eines wirksamen Widerrufs sind die beiderseits empfangenen Leistungen zurückzugewähren und ggf. gezogene Nutzungen (z. B. Zinsen) herauszugeben. Können Sie uns die empfangene Leistung ganz oder teilweise nicht oder nur in verschlechtertem Zustand zurückgewähren, müssen Sie uns insoweit ggf. Wertersatz leisten. Bei der Ãœberlassung von Sachen gilt dies nicht, wenn die Verschlechterung der Sache ausschließlich auf deren Prüfung - wie sie Ihnen etwa im Ladengeschäft möglich gewesen wäre - zurückzuführen ist. Für eine durch die bestimmungsgemäße Ingebrauchnahme der Sache entstandene Verschlechterung müssen Sie keinen Wertersatz leisten.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Paketversandfähige Sachen sind auf unsere Gefahr zurückzusenden. Sie haben die Kosten der Rücksendung zu tragen, wenn die gelieferte Ware der bestellten entspricht und wenn der Preis der zurückzusendenden Sache einen Betrag von 40 Euro nicht übersteigt oder wenn Sie bei einem höheren Preis der Sache zum Zeitpunkt des Widerrufs noch nicht die Gegenleistung oder eine vertraglich vereinbarte Teilzahlung erbracht haben. Anderenfalls ist die Rücksendung für Sie kostenfrei. Die Frist beginnt für Sie mit der Absendung Ihrer Widerrufserklärung oder der Sache, für uns mit deren Empfang.</FONT></P><P ALIGN="LEFT"><FONT COLOR="#000000" SIZE="-3">Ende der Widerrufsbelehrung</FONT></P><br><p style="font-size: 9px;" align="right">Diese Auktion wurde erstellt mit: <a href="http://www.supreme-auction.de">Supreme Auction</a> - die Software, Tool f&uuml;r die einfache Erstellung von professionellen Design Auktionen/Widgets.</p> </div>\n\t\t<div class="clear"><div style="visibility:hidden"><a href="http://www.supreme-auction.de">www.supreme-auction.de</a></div></div>\n \t</div>\n\t<div id="flash">\n\t\t<SCRIPT LANGUAGE="JavaScript">\n\t\tdocument.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="987" height="575" align="middle"> <param name="WMODE" value="transparent" /> <PARAM NAME="FlashVars" VALUE="cPath=http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/collector.swf&basePath=http%3A%2F%2Fstorage%2Esupremeauction%2Ecom%2Fflash%2F"> <PARAM NAME="movie" VALUE="http://storage.supremeauction.com/flash/startLoader2.swf"> <PARAM NAME="quality" VALUE="high"> <PARAM NAME="bgcolor" VALUE="#FFFFFF"> <embed src="http://storage.supremeauction.com/flash/startLoader2.swf" FlashVars="cPath=http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/collector.swf&basePath=http%3A%2F%2Fstorage%2Esupremeauction%2Ecom%2Fflash%2F" width="987" height="575" align="middle" wmode="transparent" menu="false" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></OBJECT><BR>');\n\t\t</SCRIPT>\n\t\t<NOSCRIPT>\n\t\t<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="987" height="575" align="middle">\n\t\t\t<param name="movie" value="http://storage.supremeauction.com/flash/startLoader2.swf" />\n\t\t\t<param name="quality" value="high" />\n\t\t\t<param name="menu" value="false" />\n\t\t\t<param name="WMODE" value="transparent" />\n\t\t\t<param name="FlashVars" value="cPath=http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/collector.swf&basePath=http%3A%2F%2Fstorage%2Esupremeauction%2Ecom%2Fflash%2F" />\n\t\t\t<embed src="http://storage.supremeauction.com/flash/startLoader2.swf" FlashVars="cPath=http://storage.supremeauction.com/flash/ebay2/10/49/76/10497654/collector.swf&basePath=http%3A%2F%2Fstorage%2Esupremeauction%2Ecom%2Fflash%2F" width="987" height="575" align="middle" wmode="transparent" menu="false" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n\t\t</object>\n\t\t</NOSCRIPT>\t\t\n\t</div>\n\t<div class="clear"></div>\n</div>\n<div class="clear"></div>\n\n<div id="doc2">\n<a href="http://www.supreme-auction.de">Supreme Auction: Kostenlose Startzeit, Bilder und Designs. Klick hier!</a>\n</div>\n<!-- +++++++++++++++++++++++++ Bitte ändern Sie im eigenen Interesse nichts an diesem Code! ++++++++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ Das kann massive Fehldarstellungen ihrer Auktion zur Folge haben! +++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ ++++++++++++++++++++++++++ Ihr Supreme Team +++++++++++++++++++++++++++++++++++++++++ -->\n<br>\n<br>\n\n</div>\n</center>\n<span style="color:white">supremeauctiononlinesoftware.flash.auction_de</span>\n\n<!-- +++++++++++++++++++++++++ Bitte ändern Sie im eigenen Interesse nichts an diesem Code! ++++++++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ Das kann massive Fehldarstellungen ihrer Auktion zur Folge haben! +++++++++++++++++++ -->\n<!-- +++++++++++++++++++++++++ ++++++++++++++++++++++++++ Ihr Supreme Team +++++++++++++++++++++++++++++++++++++++++ -->\n<!-- Supreme Automatic START -->\n<style type="text/css">\n<!--\n#automaticWidget {\n height: 252px;\n width: 989px;\n position: relative;\n}\n#automaticWidget .saline {\n\tline-height: 24px;\n\tbackground-color: #FFFFFF;\n\tfont-size: 11px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tcolor: #FFFFFF;\n\ttext-align: right;\n\tpadding-right: 5px;\n\t}\n\n-->\n</style>\n\n<center>\n\t<div id="automaticWidget">\n\t\t<SCRIPT LANGUAGE="JavaScript">\n\t\tdocument.writeln(\n\t\t\t'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="987" height="227" id="loader" align="middle">'+\n\t\t\t'<param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://storage.supremeauction.com/flash/automatic2/loaderWide.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" />'+\n\t\t\t'<param name="FlashVars" value="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" />'+\n\t\t\t'<embed src="http://storage.supremeauction.com/flash/automatic2/loaderWide.swf" FlashVars="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" '+\n\t\t\t'quality="high" bgcolor="#ffffff" width="987" height="227" name="loader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+\n\t\t\t'pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');\n\t\t</SCRIPT>\n\t\t<NOSCRIPT>\n\t\t\t<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n\t\t\t  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"\n\t\t\t  width="987" height="227" id="loader" align="middle">\n\t\t\t \t\t<param name="allowScriptAccess" value="sameDomain" />\n\t\t\t \t\t<param name="movie" value="http://storage.supremeauction.com/flash/automatic2/loaderWide.swf" />\n\t\t\t \t\t<param name="quality" value="high" />\n\t\t\t \t\t<param name="bgcolor" value="#ffffff" />\n\t\t\t \t\t<param name="FlashVars"\n\t\t\t   value="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" />\n\t\t\t \t\t<embed src="http://storage.supremeauction.com/flash/automatic2/loaderWide.swf"\n\t\t\t   FlashVars="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/"\n\t\t\t   quality="high"\n\t\t\t   bgcolor="#ffffff"\n\t\t\t   width="987" height="227" name="loader" align="middle"\n\t\t\t   allowScriptAccess="sameDomain"\n\t\t\t   type="application/x-shockwave-flash"\n\t\t\t   pluginspage="http://www.macromedia.com/go/getflashplayer" />\n\t\t\t</object>\n\t\t</NOSCRIPT>\n\t\t<div class="saline">supremeauctiononlinesoftware.automatic.gallery <a href="http://www.supreme-auction.de">Supreme Auction:</a> <a href="http://www.supreme-automatic.de">Kostenlose eBay Tools! Klick hier!</a></div>\n\t</div>\t\n</center>\n<!-- Supreme Automatic END --><!-- Supreme Automatic START -->\n<style type="text/css">\n<!--\n#automaticWidget {\n\theight: 252px;\n\twidth: 989px;\n\tposition: relative;\n}\n#automaticWidget .saline {\n\tline-height: 24px;\n\tbackground-color: #FFFFFF;\n\tfont-size: 11px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tcolor: #FFFFFF;\n\ttext-align: right;\n\tpadding-right: 5px;\n\t}\n\n-->\n</style>\n\n<center>\n\t<div id="automaticWidget">\n\t\t<SCRIPT LANGUAGE="JavaScript">\n\t\t\t\n\t\tdocument.writeln(\n\t\t\t'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="987" height="135" id="loader" align="middle">'+\n\t\t\t'<param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://storage.supremeauction.com/flash/automatic2/feedback.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" />'+\n\t\t\t'<param name="FlashVars" value="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" />'+\n\t\t\t'<embed src="http://storage.supremeauction.com/flash/automatic2/feedback.swf" FlashVars="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" '+\n\t\t\t'quality="high" bgcolor="#ffffff" width="987" height="135" name="loader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" '+\n\t\t\t'pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');\n\t\t</SCRIPT>\n\t\t\n\t\t<NOSCRIPT>\n\t\t\t<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n\t\t\t  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"\n\t\t\t  width="987" height="135" id="loader" align="middle">\n\t\t\t \t\t<param name="allowScriptAccess" value="sameDomain" />\n\t\t\t \t\t<param name="movie" value="http://storage.supremeauction.com/flash/automatic2/feedback.swf" />\n\t\t\t \t\t<param name="quality" value="high" />\n\t\t\t \t\t<param name="bgcolor" value="#ffffff" />\n\t\t\t \t\t<param name="FlashVars"\n\t\t\t   value="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/" />\n\t\t\t \t\t<embed src="http://storage.supremeauction.com/flash/automatic2/feedback.swf"\n\t\t\t   FlashVars="userPath=automatic/31/41/314162&rootPath=http://storage.supremeauction.com/flash/automatic2/"\n\t\t\t   quality="high"\n\t\t\t   bgcolor="#ffffff"\n\t\t\t   width="987" height="135" name="loader" align="middle"\n\t\t\t   allowScriptAccess="sameDomain"\n\t\t\t   type="application/x-shockwave-flash"\n\t\t\t   pluginspage="http://www.macromedia.com/go/getflashplayer" />\n\t\t\t</object>\n\t\t</NOSCRIPT>\n\t\t<div class="saline">supremeauctiononlinesoftware.automatic.gallery <a href="http://www.supreme-auction.de">Supreme Auction:</a> <a href="http://www.supreme-automatic.de">Kostenlose eBay Tools! Klick hier!</a></div>\n\t</div>\t\n</center>\n<!-- Supreme Automatic END --> 77 Baden-Baden 1 0 1 0 -10006 1.00 0.00 1.00 0 0 1 77 NULL NULL NULL 

在哪裏,應該說點擊此處繼續它只是顯示:

1.00 
<\/OBJECT> 
');\n\t\t<\/SCRIPT>\n\t\t 

其他HTML記錄顯示效果細膩

這是我使用這樣做代碼:

<?php 
session_start(); 
if (isset($_GET["cmd"])) 
    $cmd = $_GET["cmd"]; 
else 
    die("You should have a 'cmd' parameter in your URL"); 
$pk = $_GET["pk"]; 
$con = mysql_connect("localhost","x","geheim"); 
if(!$con) 
{ 
die('Connection failed because of' .mysql_error()); 
} 
mysql_select_db("ebay",$con); 
if($cmd=="GetAuctionData") 
{ 
$sql="SELECT * FROM Auctions WHERE ARTICLE_NO ='$pk'"; 
$sql2="SELECT ARTICLE_DESC FROM Auctions WHERE ARTICLE_NO ='$pk'"; 
$htmlset = mysql_query($sql2); 
$row2 = mysql_fetch_array($htmlset); 


// <p><strong>Category</strong></p> ".$row['CATEGORY']." 

$result = mysql_query($sql); 
while ($row = mysql_fetch_array($result)) 
{ 
echo "<div id='leftlayer'> 
    <strong>Article Number</strong> ".$row['ARTICLE_NO']." 
    <p><strong>Article Name</strong></p> ".$row['ARTICLE_NAME']." 
    <p><strong>Subtitle</strong></p> ".$row['SUBTITLE']." 
    <p><strong>Username</strong></p> ".$row['USERNAME']." 
    <p><strong>Total Selling</strong></p> ".$row['QUANT_TOTAL']." 
    <p><strong>Total Sold</strong></p> ".$row['QUANT_SOLD']." 

    <p><strong>Highest Bidder</strong></p> ".$row['BEST_BIDDER_ID']." 
    </div> 
<div class='leftlayer2'> 
    <strong>Current Bid</strong> ".$row['CURRENT_BID']." 
    <p><strong>Start Price</strong></p> ".$row['START_PRICE']." 
    <p><strong>Buyitnow Price</strong></p> ".$row['BUYITNOW_PRICE']." 
    <p><strong>Bid Count</strong></p> ".$row['BID_COUNT']." 
    <p><strong>Start Date</strong></p> ".$row['ACCESSSTARTS']." 
    <p><strong>End Date</strong></p> ".$row['ACCESSENDS']." 
    <p><strong>Original End</strong></p> ".$row['ACCESSORIGIN_END']." 
    <p><strong>Auction Type</strong></p> ".$row['AUCTION_TYPE']." 
</div> 
<div class='leftlayer2'> 
    <strong>Private Auction</strong></p> ".$row['PRIVATE_AUCTION']." 
    <p><strong>Paypal Accepted</strong></p> ".$row['PAYPAL_ACCEPT']." 
    <p><strong>Auction Watched</strong></p> ".$row['WATCH']." 
    <p><strong>Finished</strong></p> ".$row['FINISHED']." 

    <p><strong>Location</strong></p> ".$row['LOCATION']." 
    <p><strong>Conditions</strong></p> ".$row['CONDITIONS']." 
</div> 
<div class='leftlayer2'> 
    <strong>Auction Revised</strong></p> ".$row['REVISED']." 
    <p><strong>Cancelled</strong></p> ".$row['PRE_TERMINATED']." 
    <p><strong>Shipping to</strong></p> ".$row['SHIPPING_TO']." 
    <p><strong>Fee Insertion</strong></p> ".$row['FEE_INSERTION']." 
    <p><strong>Fee Final</strong></p> ".$row['FEE_FINAL']." 
    <p><strong>Fee Listing</strong></p> ".$row['FEE_LISTING']." 
    <p><a href='#' onclick='makewindows(" . json_encode($row2["ARTICLE_DESC"]) . "); return false;'>Click for full description </a></p> 
</div>"; 
$lastImg = $row['PIC_URL']; 
echo "<div id='rightlayer'>Picture Picture 
<img src='".$lastImg."'> 
</div>"; 

} 

} 
mysql_close($con); 
?> 
+0

這並不完全清楚 - 問題是什麼? – 2008-12-11 11:08:31

回答

0

首先,您需要轉義所有嵌入HTML的值。

您所有的$row['WHATEVER']應該是htmlspecialchars($row['WHATEVER'])。此外,您的JSON數據可能包含引號,所以應另外進行轉義:

htmlspecialchars(json_encode($row2["ARTICLE_DESC"]), ENT_QUOTES) 

在一個側面說明,你的代碼很容易受到MySQL的注入。你需要逃避任何值,你嵌入到SQL:

$sql = "SELECT * FROM Auctions WHERE ARTICLE_NO ='" . mysql_real_escape_string($pk) . "'"; 

(見模式有你需要逃避任何值,你嵌入到XXX,其中XXX是某種形式的代碼?)。