Veröffentlicht 5. April 200520 j Hallo, wie kann man den quellcode, denn man durch show_source() bekommt in erinem string importieren? geht bei mir nicht. gibts da ne andere lösung um den quelltext einer seite in einer variable zu bekommen? thx im voraus
5. April 200520 j soeben gefunden: bool show_source ( string filename [, bool return]) If the second parameter return is set to TRUE then show_source() will return the highlighted code as a string instead of printing it out. If the second parameter is not set to TRUE then show_source() will return TRUE on success, FALSE on failure. Note: The return parameter became available in PHP 4.2.0. Before this time it behaved like the default, which is FALSE sprich, probier mal $source = show_source ($filename, TRUE); s'Amstel
7. April 200520 j ansonsten kann man auch über $file = $_SERVER['DOCUMENT_ROOT'] . 'test.html'; $quell = implode("\n", file($file)); [/PHP] den Quelltext einer Datei herrauslesen.
7. April 200520 j ansonsten kann man auch über $file = $_SERVER['DOCUMENT_ROOT'] . 'test.html'; $quell = implode("\n", file($file)); [/PHP] den Quelltext einer Datei herrauslesen. Der code der bei show_source ausgewertet wird, enthält formatierungen wegen Syntax-Highlighting... Deine Variante ist plain/text.
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.