Hallo,
Habe mich etwas schlau gemacht und gesucht was der Fehler genau seien soll... Nur ich komme im sinne Korrektur des Fehlers nicht weiter.
Es ist ein Directorylisting script.
Hab den Pfad eingegeben aber damit listet das Script nicht die Dateien aus...
FEHLER:
Warning: stat(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (/var/www/web120/html/:/var/www/web120/phptmp/:/var/www/web120/files/:/var/www/web120/atd/) in /var/www/web120/html/download/index.php on line 325
hier mal das php script
	
Könnte mir jemand bitte helfen
					Habe mich etwas schlau gemacht und gesucht was der Fehler genau seien soll... Nur ich komme im sinne Korrektur des Fehlers nicht weiter.
Es ist ein Directorylisting script.
Hab den Pfad eingegeben aber damit listet das Script nicht die Dateien aus...
FEHLER:
Warning: stat(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (/var/www/web120/html/:/var/www/web120/phptmp/:/var/www/web120/files/:/var/www/web120/atd/) in /var/www/web120/html/download/index.php on line 325
hier mal das php script
PHP-Code:
	
	
<?php
    // use my own variable instead of the standard $_GET
    $varget = $_GET;
    // check to see whether a valid directory was passed to the script
    if (isset($varget["dirpath"]) && !empty($varget["dirpath"])) {
        // if it is valid, we'll set it as the directory to read data from
        $dirpath = $varget["dirpath"];
        $dirpath = str_replace('*', '&', $dirpath);
    } else {
        // if it is invalid, we'll use the default directory
        $dirpath = $defdirpath;
    }
    // if no ordering info was passed i'll use 0 (ascending)
    if (!isset($varget["order"])) {
        $varget["order"] = 0;
    }
    // check to see whether the ".." is used to open an upper level directory
    if (strpos($dirpath, "..") === false) {
    } else {
        // if it is used, we'll use the default directory
        $dirpath = $defdirpath;
    }
    // check to see whether the requested directory is not in the dcript subtree list
    if (strpos($dirpath, "./") === false || strpos($dirpath, "./") != 0) {
        // we'll use the default directory
        $dirpath = $defdirpath;
    }
    // variable used to keep slashes, so no JavaScript error occurs on line 189
    $jsdir = $dirpath;
    // strip slashes in order to get the REAL name of the file/directory
    $dirpath = stripslashes($dirpath);
    // try to change the current working directory to the one from wich i want to read contents from
    if (!@chdir($dirpath)) {
        // if the change failed, i'll use the default directory
        $dirpath = $defdirpath;
        @chdir($dirpath);
    }
    
    // once the current working directory is set, it is opened and read from
    if ($dir = @opendir(".")) {
        // while there are still entries
        while (($entry = readdir($dir)) !== false) {
            // split the filename into name and extension
            $split_name_ext = explode(".", $entry);
            // store the file extension
            $extensie = (count($split_name_ext)-1 != 0) ? $split_name_ext[count($split_name_ext)-1] : "";
            // store the lowercased extenosion
            $lextensie = strtolower($extensie);
            // if the entry is to be shown (not part of the '$not_to_be_shown' array)
            // decide whether it is a directory or a regular file and add it accordingly
            if (!in_array($lextensie, $ext_not_to_be_shown)) {
                if (!in_array($entry, $not_to_be_shown)) {
                    if (!is_dir($entry)) {
                        $fisiere[] = $entry;
                    } else {
                        $directoare[] = $entry;
                    }
                }
            }
        }
        // close the opened directory
        closedir($dir);
    }
?>
Könnte mir jemand bitte helfen
          
							
						
Kommentar