Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Problema header o mimetype

    Sto facendo un script per navigare fra le cartelle del mio host e visionare i files

    Riesco a vedere le immagina, ma con i file .php non me le ristuisce tipo testo, i file .html mi esegue la .dtd, riesco a vedere senza problemi solo i files .txt o .cgi

    che sia un problema di header o mime type?

    ecco il codice che ho scritto fin qui':

    [php]
    <?php

    //
    // Se è una directory ..

    if ( is_dir($path) ) {

    echo "Path: <font color=white>$path</font>
    \n";

    $path .= "/";


    if ($dh = opendir($path)) {

    echo "<html><head><title>$path</title>";
    echo "<style></style>\n";
    echo "</head><body bgcolor=#4791C5>\n";
    echo "<table bgcolor=#333 align=center border=0 width=100% cellpadding=3 cellspacing=1><tr bgcolor=#9acd32>\n";
    echo "<td>Filename</td><td>Filetype</td><td>Filesize</td><td>Last_mod</td><td>Chmod</td>\n";
    echo "</tr>\n";

    while ( ($file = readdir($dh)) !== false )
    {

    $filename = $file;
    $fullname = $path . $file;
    $filetype = filetype($fullname);
    $filesize = filesize($fullname);
    $file_last_mod = date ("F d Y H:i:s.", filemtime($fullname));
    $file_chmod = substr(sprintf('%o', fileperms($fullname)), -4);

    if (is_dir($fullname)) { $bgcolor="#fff"

  2. #2
    il forum mi ha tagliato il codice .. perchè?

  3. #3

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.