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.

Cannot modify header information

Empfohlene Antworten

Veröffentlicht

Datei test1.php

if(isset($_GET["msg"]))

{

echo "<span class=\"confirmstyle\">" . $_GET["msg"] . "</span><br><br>";

}

Datei test2.php

function check_number($nummer)

{

if (preg_match("=^[0-9]+$=i",$nummer))

{

return TRUE;

}

else

{

return FALSE;

}

}

if(check_number($_POST["anzahl"]))

{

// mein zeugs ;-)

}

else

{

header("location: main.php?msg=Sie%20müssen%20eine%20Zahl%20eingeben!");

}

Wenn er nun den header ausführt kommt folgende Meldung:

Warning: Cannot modify header information - headers already sent by (output started at test2.php:10) in test2.php on line "header("location: main.php?msg=Sie%20müssen%20eine%20Zahl%20eingeben!");

Danke für jede Hilfe !

Gruß Scratch ;-)

Hi!

vor dem Aufruf von header() darf keine Ausgabe stattfinden!

Gruß

Azrael

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.