MyBB.de Forum

Normale Version: Onlineliste
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Du kannst keine URL verwenden. Die Codes in diesem Thema machen das nicht, du scheinbar schon...
Bei dem Standart-Code von oben hab ich natürlich noch meine Url hinzugefügt.
http://www.germanen.redio.de/et_chat_v30...ig.inc.php etc. Wink
Aber der Chat ist in einem ganz anderen Ordner...
Ich hab es jetzt mal mit anderen Datein auprobiert.

ob_start();
include("xxx.html");
$chaton = ob_get_contents();
ob_end_clean();

Das wieder oben in der index.php

Die xxx.html Datei:
PHP-Code:
<script>

farbbibliothek = new Array();
farbbibliothek[0] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[1] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[2] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[3] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[4] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[5] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
farbbibliothek[6] = new Array("#AFEEEE","#A4EFEF","#95EFEF","#86EFEF","#77EFEF","#68EFEF","#59EEEF","#4AEEEF","#3BEEEF","#2CEEEF","#1DEEEF","#0EEEEF","#00EEEF","#00DEDF","#00CECF","#00BEBF","#00AEAF","#009E9F","#008F8F","#007F7F","#008F8F","#009E9F","#00AEAF","#00BEBF","#00CECF","#00DEDF","#00EEEF","#0EEEEF","#1DEEEF","#2CEEEF","#3BEEEF","#4AEEEF","#59EEEF","#68EFEF","#77EFEF","#86EFEF","#95EFEF","#A4EFEF");
/*
    0 - Rot-Gelb-Ãœbergang    -Standard
    1 - Matrix-Effekt
    2 - Scanner
    3 - Regenbogendurchgang
    4 - Rot-Schwarz-Durchgang
    5 - Zebra
    6 - Gelb-Blau-Stroboskop
*/
farben farbbibliothek[0];    // Wecher Farbsatz soll genommen werden
function farbschrift()
{
        for(var 
i=i<Buchstabe.lengthi++)
        {
        
document.all["a"+i].style.color=farben[i];
        }
        
farbverlauf();
}
function 
string2array(text)
{
    
Buchstabe = new Array();
    while(
farben.length<text.length)
    {
        
farben farben.concat(farben);
    }
    
k=0;
    while(
k<=text.length)
    {
        
Buchstabe[k] = text.charAt(k);
        
k++;
    }
}
function 
divserzeugen()
{
        for(var 
i=i<Buchstabe.lengthi++)
        {
        
document.write("<span id='a"+i+"' class='a"+i+"'>"+Buchstabe[i] + "</span>");
        }
        
farbschrift();
}
        var 
a=1;
function 
farbverlauf()
{
        for(var 
i=i<farben.lengthi++)
        {
                
farben[i-1]=farben[i];
        }
        
farben[farben.length-1]=farben[-1];

        
setTimeout("farbschrift()",50);
}
// Zu Demonstrationszwecken*****************
    
var farbsatz=1;
function 
farbtauscher()
{
    
farben farbbibliothek[farbsatz];
    while(
farben.length<text.length)
    {
        
farben farben.concat(farben);
    }
    
farbsatz=Math.floor(Math.random()*(farbbibliothek.length-0.0001));
}
setInterval("farbtauscher()",8000);
//*******************************************
</script>
</
head>
<
body text=white>
<
p>
<
center>
<
p style="font-size: 20pt;">
<
script>
text"Test...";    //Der darzustellende Text
string2array(text);
divserzeugen();
</
script>
</
a>
</
p

Das sieht dann so aus: http://germanen.redio.de/Upload/xxx.html
Aber wenn ich $chaton wo einfüg ist der Text einfach Schwarz...!?
Du kannst kein PHP in einer HTML-Datei verwenden.
(17.08.2009, 09:46)StefanT schrieb: [ -> ]Du kannst kein PHP in einer HTML-Datei verwenden.

Ändert nicht viel an der Tatsache, dass der Text sturr schwarz bleibt.
Ah, ich verstehe. Ich sehe den Text allerdings gar nirgends. Ist er richtig eingebaut?
Ich hab ihn wieder entfernt...
Dann kann ich dir auch nicht helfen. Toungue
Seiten: 1 2