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.

Aktueller Ordner

Empfohlene Antworten

Hallo ich bin echt am verzweifeln:

alles was ich brauche ist eine Information in welchem Ordner meine Datei liegt!

Z.B. www.meinepage.de/functions/func.php

Dann hätte ich gerne als ausgabe: functions

Das ganz in PHP.

Ich dachte eigentlich das das PHP selber global speichert, aber dem ist ned so.

Also phpinfo() hilft mir ned :(

Ich könnte zwar anfangen zu schnippseln und zu exploaden, aber da muss es doch schon was fertiges geben oder ?

Ich hab darüber 0,0 gefunden, kann das sein ?!

danke mcmaiers

Ok die möglichkeit geht, aber geht das nicht noch einfacher ?

$parts = explode("/", exec(pwd));

echo $parts[(count($parts)-1)];

$verzeichnis = str_replace($_SERVER["DOCUMENT_ROOT"], "", dirname($PHP_SELF));

sollte eigentlich klappen, ungetestet.

s'Amstel

$verzeichnis = str_replace($_SERVER["DOCUMENT_ROOT"], "", dirname($PHP_SELF));

falls du deine func.php per include/require wo anders einbindest, wird allerdings $PHP_SELF immer die Hauptdatei zurückgeben, also zB .../index.php

Hilfreicher ist da die __FILE__ (je zwei Unterstriche, kein $, sowas wie ne variable Konstante), das gibt IMMER die Datei zurück, in der es aufgerufen wurde.

MfG

Danke :) aber ich brauch ja ned die Datei, sondern den Ordner ... habs aber eh schon .. .trotzdem danke :o)

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.