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.

HTML Seite generieren???

Empfohlene Antworten

Veröffentlicht

Hi,

wie kann ich mit PHP eine HTML Seite generieren lassen, die eine .txt Datei nach Informationen (getrennt mit tab) auslesen kann. Die TXT sieht folgendermaßen aus:

20020930 Canon 1033387813 1600 1700 Martin Fandel AMT02 Test test test #FF9900

20020930 Fujitsu Siemens 1033387800 1400 1500 Martin Fandel AMT02 Test test test #FF9900

20020930 Sony 1033387821 1600 1700 Martin Fandel AMT02 Test test test #FF9900

Also der soll dann die HTML Seite generieren (im Hintergrund) Dann sollte man nur auf die Schaltfläche "Drucken" klicken auf der PHP Seite und das HTML Dokument soll ausgedruckt werden. Wie kann ich da vorgehen? Wo kann ich Informationen herkriegen? Kennt jemand vielleicht sogar schon eine Lösung? Hab nähmlich schon @ google gesucht aber bis jetzt noch nix gefunden.

Gruß

Martin

Zum einlesen:

http://www.php.net/file

Zum splitten der Daten:

http://www.php.net/explode



$wholefile = file("daten.txt");

reset($wholefile);

while (current($wholefile)) {

   $dataset = explode("\t",current($wholefile));

   # do something with array $dataset

   # print, modify, whatever

   next($wholefile);

}

Etwas umfangreicher wirds wenn deine Daten auch mit mehreren Tabs oder anderen Whitespaces getrennt sein dürfen.

danke :-) Ich werd mich mal auf den Seiten informieren. Ich hab mal im PHP Tutorial was gelesen, wie man Dateien Passwortschützen kann. Da Blick ich aber nicht so richtig durch. Kann mir das jemand genauer errklären???

Danke!

Martin

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.