Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

show_source() ausgabe in einer variable

Empfohlene Antworten

Veröffentlicht

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

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

Supi, Thx...

ansonsten kann man auch über



$file = $_SERVER['DOCUMENT_ROOT'] . 'test.html';
$quell = implode("\n", file($file));

[/PHP]

den Quelltext einer Datei herrauslesen.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.