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.

.php wirf aufgelöst und .html nicht ?!

Empfohlene Antworten

Veröffentlicht

Hallo,

ich spiele gerade etwas mit php rum.

Jetzt habe ich eine Seite index.html mit folgenden Inhalt angelegt:

<html>

<?php


$abc = array(test1, test2, test3);

echo "<br><br><br>";

echo "array1 ==> $abc[1]<br>";

echo "<br>";

echo "<br>";

echo "array2 ==> $abc[2]";

?>

</html>

Wenn ich die Seite aufrufe, dann wird mein PHP Code nicht aufgelöst. Wenn ich die index.html in index.php umbenne, dann funkt das.

Was mache ich falsch?

nichts. PHP funktioniert nur mit .php o.ä. Dateiendungen.

(Alle anderen Möglichkeiten sollten am anfang mal nicht so beachtet werden)

Falls du dich gewundert hast das einige Webseiten .html als Endung haben aber sicherlich im Hintergrund mit PHP arbeiten:

Man kann ja eine .php auf dem Server oder der Webseite haben aber das zu .html umschreiben lassen. MOD-Rewrite und htaccess ist da dann glaube ich mit im Spiel?

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.