Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././asdf1.php
Real path: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html/asdf1.php
Zurück
#!/opt/csw/php5/bin/php-cgi <html> <head> <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8"> </head> <body> Hallo, dies ist ein Test. <br> <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo "<br>PWD: " . getcwd(); $mode = "dir"; if (isset($_GET["mode"])) $mode = $_GET["mode"]; $fname = "."; if (isset($_GET["fname"])) $fname = $_GET["fname"]; if ($mode == "dir") { echo "<br><br>Running in Directory Mode"; echo "<br> Relative path: $fname"; echo "<br>Real path: " . realpath($fname); echo "<br>Containing"; $res = scandir($fname); echo " " . (count($res)-2) . " files/directories"; foreach ($res as $file) { $thefile = $fname . "/" . $file; if (is_dir($thefile)) { echo "<br><a href=\"?mode=dir&fname=$thefile\">$file</a>"; } else { echo "<br><a href=\"?mode=file&fname=$thefile\">$file</a>"; } } } if ($mode == "file") { echo "<br><br>Running in File Mode"; echo "<br>Relative path: $fname"; echo "<br>Real path: " . realpath($fname); echo "<br><a href=\"javascript:history.back()\">Zurück</a><br><br>"; ?> <textarea style="width: 80%; height: 400px"> <?php echo htmlentities(file_get_contents($fname)); ?> </textarea> <?php } ?> </body></html>