"; $files1 = scandir($dir1); // $files2 = scandir($dir1, 1); //print_r($files1); //print_r($files2); foreach ($files1 as $key =>$value ) // =>$value $key { ?>

">

Partea 2

$value) { // echo "$value\n"; if (!in_array($value,array(".",".."))) { if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) { $result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value); } else { $result[] = $value; } } } return $result; } // print_r(dirToArray($dir)); echo "

Full path to this dir: " . $dir1 . "

"; // echo "

Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "

"; echo "info server
"; $base_dir = __DIR__; // Absolute path to your installation, ex: /var/www/mywebsite $doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www $base_url = preg_replace("!^${doc_root}!", '', $base_dir); # ex: '' or '/mywebsite' $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https'; $port = $_SERVER['SERVER_PORT']; $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : ":$port"; $domain = $_SERVER['SERVER_NAME']; $full_url = "${protocol}://${domain}${disp_port}${base_url}"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc. echo " Url-ul este: $full_url