Hi
ich weiss, ist wieder ne dumme frage aber ich habe keine ahnung warum das net klappt
bei meinem gästebuch ist das eingabegeld für den text auch $text. jetzt möchte ich, dass er z.B. :-) oder ;-) mit einem Smily ersetzt...
so sieht das dann bei mir aus
aber was is daran nun falsch? der gibt das bild nicht aus, nur den normalen text
Gruß
Gaint
PS:
ichw eiss ich bin dumm, müsst ihr mir nicht sagen
ich weiss, ist wieder ne dumme frage aber ich habe keine ahnung warum das net klappt

bei meinem gästebuch ist das eingabegeld für den text auch $text. jetzt möchte ich, dass er z.B. :-) oder ;-) mit einem Smily ersetzt...
so sieht das dann bei mir aus
PHP-Code:
$smilys = fopen("posts.txt", "r+");
$text = str_replace(":-)","<img src=\"smilys\aiwebs_004.gif\"","$text");
$text = str_replace(":)","<img src=\"smilys\aiwebs_004.gif\"","$text");
$text = str_replace(";-)","<img src=\"smilys\aiwebs_032.gif\"","$text");
$text = str_replace(";)","<img src=\"smilys\aiwebs_032.gif\"","$text");
$text = str_replace(":(","<img src=\"smilys\aiwebs_003.gif\"","$text");
$text = str_replace(":-(","<img src=\"smilys\aiwebs_003.gif\"","$text");
$text = str_replace(":-D","<img src=\"smilys\aiwebs_011.gif\"","$text");
$text = str_replace(":D","<img src=\"smilys\aiwebs_011.gif\"","$text");
$text = str_replace("Oo","<img src=\"smilys\aiwebs_013.gif\"","$text");
$text = str_replace("oO","<img src=\"smilys\aiwebs_013.gif\"","$text");
$text = str_replace("O.o)","<img src=\"smilys\aiwebs_013.gif\"","$text");
$text = str_replace("o.O)","<img src=\"smilys\aiwebs_013.gif\"","$text");
$text = str_replace(":S)","<img src=\"smilys\aiwebs_023.gif\"","$text");
$text = str_replace(":-S)","<img src=\"smilys\aiwebs_023.gif\"","$text");
$text = str_replace("o-)","<img src=\"smilys\aiwebs_025.gif\"","$text");
$text = str_replace("O-)","<img src=\"smilys\aiwebs_025.gif\"","$text");
$text = str_replace("o)","<img src=\"smilys\aiwebs_025.gif\"","$text");
$text = str_replace("O)","<img src=\"smilys\aiwebs_025.gif\"","$text");
fputs ($smilys,$text);
fclose ($smilys);
Gruß
Gaint
PS:
ichw eiss ich bin dumm, müsst ihr mir nicht sagen
Kommentar