Codeschnipsel - Serverdateipfad auslesen
Code:<?php function setpas(){ $setpas = explode('/', $_SERVER["SCRIPT_FILENAME"]); return str_replace($setpas[count($setpas)-1], '', $_SERVER["SCRIPT_FILENAME"]); } echo 'Pfad lautet:' . setpas(); ?>
Code:<?php function setpas(){ $setpas = explode('/', $_SERVER["SCRIPT_FILENAME"]); return str_replace($setpas[count($setpas)-1], '', $_SERVER["SCRIPT_FILENAME"]); } echo 'Pfad lautet:' . setpas(); ?>