0

OK、ばかげていることを許してください。しかし、私はこれが初めてです。私はhtmlタグとフォーマットを含むレコードセットを持っています:

<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-add-space: auto; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst>
<SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><SPAN style="mso-list: Ignore">·
<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN> <FONT face=Calibri>
Bundle Includes
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> <o:p></o:p></FONT></P> 
 <P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1" class=MsoListParagraphCxSpMiddle>
 <SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
 <SPAN style="mso-list: Ignore">o
 <SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN>
<FONT face=Calibri>2 Year Extended Warranty For Toshiba 1 Year Notebook (Inc. Courier Pickup / Return Service) , Suitable for Satellite Pro C665, L730, L750, L770, P770, S750<o:p></o:p></FONT></P>
   <P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1" class=MsoListParagraphCxSpMiddle>
  <SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
  <SPAN style="mso-list: Ignore">o
  <SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN>
   <FONT face=Calibri>Toshiba 75W ACAdaptor 3pin19V<o:p></o:p></FONT></P> 
   <P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1" class=MsoListParagraphCxSpMiddle>
   <SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
    <SPAN style="mso-list: Ignore">o
   <SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN>
   <FONT face=Calibri>BitDefender Internet Security 2012 OEM<o:p></o:p></FONT></P>  <P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 72pt; mso-add-space: auto; mso-list: l0 level2 lfo1" class=MsoListParagraphCxSpLast> <SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"><SPAN style="mso-list: Ignore">o<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT face=Calibri>Everki 16" Advance Compact Bag<o:p></o:p></FONT></P>

次に、これを .php ページに挿入して、書式設定を使用して説明を記述する必要があります。挿入すると、生のhtmlとして表示されます。

繰り返しますが、その可能性は誰かにとって簡単なので、あなたの助けが感謝されます

ありがとう

4

2 に答える 2

0

データベースに保存されているHTMLコードには、HTMLエンティティがエンコードされている可能性があります。データを呼び出し$myHTML = html_entity_decode($myHTMLFromDatabase)てみてください。urldecode()とを使用して、何もエスケープされていないことを確認してくださいstripslashes()

于 2012-10-03T13:28:32.993 に答える
0

HTML データをSerializeフォーマットで保存し、それを使用して表示Unserializeします。

参照: - http://php.net/manual/en/function.serialize.php

http://php.net/manual/en/function.unserialize.php

于 2012-10-03T13:21:28.103 に答える