|
#1
|
|||
|
|||
|
Danke für die Infos |
|
#2
|
|||
|
|||
|
mit highlight_string(); dürfte es gehen...
__________________
|
|
#3
|
|||
|
|||
|
herzlichen dank. habe nun eine funktion gefunden und versucht einzubauen. hier die funktion:
Code:
function highlight_php($string)
{ $string = str_replace("[anfang]","<?php",$string); $string = str_replace("[ende] ","?>",$string); $Line = explode("\n",$string); for($i=1;$i<=count($Line);$i++) { $line .= "".$i." "; } ob_start(); highlight_string($string); $Code=ob_get_contents(); ob_end_clean(); $header='<table border="0" cellpadding="0" cellspacing="0" width="500" style="border-style: solid; border-width:1px; border-color: black black black black"> <tr> <td width="100%" colspan="2" style="border-style: solid; border-width:1px; border-color: #CC0000 #CC0000 black #CC0000; background-color: #CC0000; font-family:Arial; color:white; font-weight:bold;">PHP-Code:</td> </tr> <tr> <td width="3%" valign="top" style="background-color: #CC0000; border-style: solid; border-width:1px; border-color: #CC0000 black #CC0000 #CC0000;"><code>'.$line.'</code></td> <td width="97%" valign="top" style="background-color: white;"><table><tr><td width=2%></td><td width=98%><div style="white-space: nowrap; overflow: auto;"><code>'; $footer=$Code.'</td></tr></table></div></code></td> </tr> </table>'; echo $header.$footer; } herzlichen dank für die hilfe |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
|
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Quelltext in Textarea ausgeben | glommy | PHP | 16 | 26.11.2006 17:09 |
| Vom ERM zum Quelltext | dbender | PHP | 2 | 12.05.2006 09:14 |
| Quelltext einer Site ausgeben | Sibbl255 | PHP | 2 | 19.10.2005 11:25 |
| Quelltext? | void | JavaScript | 4 | 12.09.2005 08:52 |
| Funktionsname gesucht: Quelltext einer Php Datei ausgeben | phplehrling | PHP | 3 | 04.12.2004 22:14 |