Autor Beitrag
Sebi2020
Hält's aus hier
Beiträge: 6

Win XP
Visual Basic 6 Prof., HTML, anf. PHP
BeitragVerfasst: Do 20.07.06 20:22 
Ich will in meiner HTML Seite ein Codebeispiel geben aber ich will nicht, dass dieser Code vom Internet Explorer als Tags usw. anerkannt wird sondern als Text.

Bitte helft mir, was muss ich machen?
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Do 20.07.06 20:45 

_________________
Jailbird
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Do 20.07.06 20:47 
Zitat:
Beachten Sie:

Innerhalb von <pre> und </pre> gelten wie in anderen Textabschnitten die Aussagen zu Zeichenvorrat, Sonderzeichen und HTML-eigene Zeichen. HTML-Elemente innerhalb von <pre> und </pre> werden interpretiert.


So gehts nicht, da er ja tags anzeigen will, aber auch mit <pre> werden diese interpretiert.
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Do 20.07.06 20:55 
Eine mit php includede txt datei sollte nich interpretiert werden.

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Do 20.07.06 21:06 
Hi,
nimm doch einfach n großes Textfeld.
Mit n bissel css kannste das einfach anpassen, kannst dem user verbieten da was neues reinzuschreiben...

hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Do 20.07.06 21:16 
Du musst die entsprechenden Tags umformatieren. Statt < im Code schreibst Du &lt;, statt > &gt; und so weiter. Dann wird es nicht interpretiert.

Und wieso sollte ein mit PHP includete Datei nicht interpretiert werden? Schließlich macht die HTML-Darstellung ja der Browser.


Zuletzt bearbeitet von UGrohne am Fr 21.07.06 08:27, insgesamt 1-mal bearbeitet
oern
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 142

Linux, Win XP
D7
BeitragVerfasst: Do 20.07.06 21:21 
es gibt geshi für php damit kann man code auf webseiten ausgeben etwa so wie im forum hier. aber daten lädt man aus einer datei besser mit file_get_contents.

_________________
Ich hab eine Signatur
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Do 20.07.06 21:46 
Und dann gibt es noch die <code>-Tags. Ob auch HTML in einen <code></code>-Block interpretiert wird weiß ich leider nicht.

Beachte am besten mal den Hinweis von UGrohne, denn dann sind immerhin die jeweiligen Code-Stellen W3-Valid und der Browser startet normalerweise nicht im Quirks-Modus ;-)
Sebi2020 Threadstarter
Hält's aus hier
Beiträge: 6

Win XP
Visual Basic 6 Prof., HTML, anf. PHP
BeitragVerfasst: Do 20.07.06 21:55 
Titel: Code Tags
Die Code Tags habe ich schon davor gesetzt und mit CSS formatiert. Aber der Internet Explorer liest die Tags immer noch mit. Ich hab jetzt den Tipp von UGrohne genommen und es klappt.

_________________
Sebi
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 20.07.06 22:48 
Bei HTML <pre> Mein Code </pre>

Edit - Bloss die Frage gelesen pre wurde schon erwähnt, soweit Ich weiß gibts auch <code></code> vieleicht klappts damit - weiß Ich aber nicht genau.
DelphiAnfänger
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 112

Win XP, Firefox 2.0, IE6
Delphi 5 Prof., Delphi 2005 PE
BeitragVerfasst: Fr 21.07.06 01:19 
du kannst statt "<" und ">" &lt; bzw. &gt; verwenden
Spieler1
ontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 469


D6 Pers
BeitragVerfasst: Fr 21.07.06 11:04 
user profile iconFighter#1 hat folgendes geschrieben:
Eine mit php includede txt datei sollte nich interpretiert werden.
Wieso sollte die denn nicht interpretiert werden? Der Browser weiß doch nicht, woher der Inhalt der ihm übertragenen fertigen HTML-Datei stammt, und sofern die txt-Datei HTML-Code enthält, wird der behandelt wie jeder andere auch. ;)
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 21.07.06 11:29 
Wieso frage ich mich gerade, ob überhaupt noch jemand die Antworten liest, die bereits gegeben wurden? :roll:
jonathanschmid
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 22.07.06 02:34 
Titel: Re: Code Tags
Hmm, da bist du nicht der Einzige!

user profile iconSebi2020 hat folgendes geschrieben:
Die Code Tags habe ich schon davor gesetzt und mit CSS formatiert. Aber der Internet Explorer liest die Tags immer noch mit. Ich hab jetzt den Tipp von UGrohne genommen und es klappt.


Alle Probleme waren wohl schon hier gelöst :D Aber trotzdem noch ein kleiner Tipp: Wenn du auch PHP verwendest kannst du dir die Mühe sparen das alles per Hand zu machen und die Funktion htmlentities() verwenden!
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Sa 22.07.06 08:59 
Scheint echt, als ob nicht jeder die Antworten durchliest.
Hab mich wohl vertan mit dem include befehl...

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse