13.08.2009, 18:21
Seiten: 1 2
13.08.2009, 18:23
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.
http://www.germanen.redio.de/et_chat_v30...ig.inc.php etc.
13.08.2009, 18:30
Das ist aber nicht möglich: http://de.php.net/manual/de/function.include.php
13.08.2009, 18:31
Aber der Chat ist in einem ganz anderen Ordner...
16.08.2009, 18:11
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:
Das sieht dann so aus: http://germanen.redio.de/Upload/xxx.html
Aber wenn ich $chaton wo einfüg ist der Text einfach Schwarz...!?
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=0 ; i<Buchstabe.length; i++)
{
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=0 ; i<Buchstabe.length; i++)
{
document.write("<span id='a"+i+"' class='a"+i+"'>"+Buchstabe[i] + "</span>");
}
farbschrift();
}
var a=1;
function farbverlauf()
{
for(var i=0 ; i<farben.length; i++)
{
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...!?
17.08.2009, 09:46
Du kannst kein PHP in einer HTML-Datei verwenden.
17.08.2009, 13:30
(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.
17.08.2009, 14:40
Ah, ich verstehe. Ich sehe den Text allerdings gar nirgends. Ist er richtig eingebaut?
17.08.2009, 20:03
Ich hab ihn wieder entfernt...
18.08.2009, 13:31
Dann kann ich dir auch nicht helfen.
Seiten: 1 2