Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
S

sim

@sim
Non seguire Segui
Informazioni
Post
9
Discussioni
3
Condivisioni
0
Gruppi
0
Da chi è seguito
0
Chi segue
0

Post

Recenti Migliore Controverso

  • Ciao a tutti!...
    S sim
    Presentati alla Community

    Grazie a tutti! ^^


  • [PHP] Nome utente tramite DB o Sessione
    S sim
    Coding

    Questo problema l'avevo risolto! 🙂
    Ora il problema è questo:

    • La data è errata
    • La dimensione pure
    • Anche il tipo di file...
    • Vengono mostrati i dati solo x 1 file!!!
      =================================
      <?
      session_start();
      if(!session_is_registered(myusername)){
      header("location:login2.php");
      }
      ?>
      <?php
      include ("/membri/sim/file/dw/config.php"); // Dati + Con x accedere al DB!
      ?>
      <?

    configuration

    $show_path = 1; # show local path
    $show_dotdirs = 0; # show and '..'

    $path = substr($SCRIPT_FILENAME, 0, strrpos($SCRIPT_FILENAME, "/")+1);
    ?>
    <html>
    <head>
    <title>@@@SIMUPLOADER@@@</title>
    <style type="text/css">
    <!--
    a, a:active {text-decoration: none; color: blue;}
    a:visited {color: #48468F;}
    a:hover, a:focus {text-decoration: underline; color: red;}
    body {background-color: #F5F5F5;}
    h2 {margin-bottom: 12px;}
    table {margin-left: 12px;}
    th, td { font-family: "Courier New", Courier, monospace; font-size: 10pt; text-align: left;}
    th { font-weight: bold; padding-right: 14px; padding-bottom: 3px;}
    td {padding-right: 14px;}
    td.s, th.s {text-align: right;}
    div.list { background-color: white; border-top: 1px solid #646464; border-bottom: 1px solid #646464; padding-top: 10px; padding-bottom: 14px;}
    div.foot { font-family: "Courier New", Courier, monospace; font-size: 10pt; color: #787878; padding-top: 4px;}
    username:first-letter {font-family: "Courier New", Courier, monospace; font-size: 10pt; color: #787878; padding-top: 4px; font-variant: small-caps;}
    /*body, th, td { background-color: #ffffff;
    font-family: verdana, arial;
    }

    a:link       { color: #666666;
                   text-decoration: underline;
                 }
    a:visited    { color: #444444;
                   text-decoration: underline;
                 }
    a:hover      { color: #666666;
                   text-decoration: none;
                 }
    a:active     { color: #660000;
                   text-decoration: none;
                 }
    
    table.files  { background-color: #222222;
                   border: 2px solid #cccccc;
                   border-spacing: 1px;
                   width: 480px;
                 }
    th.files     { background-color: #4466aa;
                   color: #ffffff;
                   font-size: 11pt;
                   font-weight: bold;
                   text-align: left;
                   padding: 2px;
                 }
    td.files     { background-color: #eeeeee;
                   color: #666666;
                   font-size: 9pt;
                   font-weight: normal;
                   padding: 6px;
                 }*/
    

    -->
    </style>
    </head>
    <body>
    <h2><?php if ($show_path == 1) { echo "Posizione: "; echo $path; } else { echo "Contenuto della Directory..."; } ?></h2>
    <div class="list">
    <table summary="Directory Listing" cellpadding="0" cellspacing="0">
    <thead><tr><th class="n">Nome</th><th class="m">Ultima Modifica</th><th class="s">
    Peso</th><th class="t">Tipo</th></tr></thead>

    <tbody>
    <tr><td class="n"><a href="">Cartella Precedente</a>/</td><td class="m">-  </td><td class="s">-  </td><td class="t">
    Cartella</td></tr>
    <tr><td class="n"><?php
    $dirs = array();
    $files = array();

    $dir = dir($path);
    while ($entry = $dir->read()) {
    if ($entry != "." && substr($entry, -4) != ".php") {
    if (is_dir($entry)) {
    if ($entry != ".." || $show_dotdirs){
    $dirs[] = $entry;
    }
    } else {
    $files[] = $entry;
    }
    }
    }
    $dir->close();

    sort($dirs);
    foreach ($dirs as $dir) {
    echo '<a href="' . $dir . '">' . $dir . "</a><br />\n";
    }

    sort($files);
    foreach ($files as $file) {
    echo '<a href="' . $file . '">' . $file . "<br />\n";
    }
    ?></td><td class="m"><?php

    $filedata = $file;

    echo date ("m/j/Y h:i", filemtime($filedata));
    /// il file da verificare.
    $modifica = $file;
    // variabile che prende l’informazione.
    $last_time_modified = filemtime($modifica);
    // formatta la data
    $last_mod = date("m/j/Y h:i", $last_time_modified);
    print $last_mod;
    /
    ?></td><td class="s"><?php

    $filesize = $file;

    echo sizeof($filesize);
    /*
    function filesize_format($file) {
    if($file < pow(1024, 1)) return $file. "B";
    elseif($file < pow(1024, 2)) return round($file/pow(1024, 1), 3)."Kb";
    elseif($file < pow(1024, 3)) return round($file/pow(1024, 2), 3)."Mb";
    elseif($file < pow(1024, 4)) return round($file/pow(1024, 3), 3)."Gb";
    }
    echo filesize_format($file);/
    /
    $strimmagine = file_get_contents($file);
    $dimensione = strlen($strimmagine);
    echo ("$dimensione");*/
    ?></td><td class="t"><?php

    $filetipo = $file;

    echo filetype($filetipo); // tipo del file
    ?></td></tr>
    </tbody>
    </table>
    </div>
    <div class="foot"><i>Ciao <span class="username"><?php
    /*
    $query = "SELECT username FROM admin";
    $result = mysql_query($query);

    while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { }*/
    echo $myusername;
    ?></span>
    ... <a href="logout.php">Logout</a></i></div>
    </body>
    </html>

    Url: sim.altervista.org/file/dw/
    Username: prova
    Password: prova
    Grazie.Ciao Davide!


  • Funzione getimagesize
    S sim
    Coding

    C'è un errore alla linea 122!
    Ciao! ^^


  • [PHP] Nome utente tramite DB o Sessione
    S sim
    Coding

    Ciao a tutti, ho un problema:
    Io registro una sessione chiamata myusername, ora vi chiedo come faccio a sapere l'utente loggato?

    Ciao $utente... Logout

    In pratica è così:
    Form Login -> Pagina di check Invia al database, ritornano e se sono giusti crea la sessione -> Redirect alla pagina dei files
    E io voglio che mi mostri l'username della sessione!
    Grazie.Ciao Davide!^^
    PS: io ho provato con:

    <?php

    $query = "SELECT username FROM admin";
    $result = mysql_query($query);

    while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "<span class="username">{$row['username']}</span>";
    }
    ?>

    Ma mi mostra tutti gli username
    Io voglio che mi mostri solo l'username che è loggato!..
    Grazie!


  • Ciao a tutti!...
    S sim
    Presentati alla Community

    Grazie! 🙂


  • [PHP] Script elenco file
    S sim
    Coding

    nessuno?...


  • Ciao a tutti!...
    S sim
    Presentati alla Community

    Ciao a tutti, mi chiamo Davide, ho 14 anni e sono di Palermo!
    Ottimo forum 😉
    Le mie passioni sono: TheSims - Grafica - Computer..
    Ciao! ^_^


  • [PHP] Script elenco file
    S sim
    Coding

    ..nessuno? 🙂


  • [PHP] Script elenco file
    S sim
    Coding

    Ciao a tutti, sono Davide (un nuovo utente)...
    Vi posto il mio problema:
    Ho usato come base uno script, ma esso mi da problemi:

    sim.altervista.org/file/dw/dirindex.php

    Ora questo non funziona come deve:

    • La dimensione non è corretta!
    • Vorrei togliere i ".." e il "."
    • Non viene mostrato il Tipo del File/Cartella
      ...ecco il codice:
    <?
    # configuration
    $show_path     = 1;   # show local path
    $show_dotdirs  = 1;   # show and '..'
    
    $path = substr($SCRIPT_FILENAME, 0, strrpos($SCRIPT_FILENAME, "/")+1);
    ?>
    <html>
    <head>
      <title>directory listing</title>
      <style type="text/css">
      <!--
       a, a:active {text-decoration: none; color: blue;}
    a:visited {color: #48468F;}
    a:hover, a:focus {text-decoration: underline; color: red;}
    body {background-color: #F5F5F5;}
    h2 {margin-bottom: 12px;}
    table {margin-left: 12px;}
    th, td { font-family: "Courier New", Courier, monospace; font-size: 10pt; text-align: left;}
    th { font-weight: bold; padding-right: 14px; padding-bottom: 3px;}
    td {padding-right: 14px;}
    td.s, th.s {text-align: right;}
    div.list { background-color: white; border-top: 1px solid #646464; border-bottom: 1px solid #646464; padding-top: 10px; padding-bottom: 14px;}
    div.foot { font-family: "Courier New", Courier, monospace; font-size: 10pt; color: #787878; padding-top: 4px;}
       /*body, th, td { background-color: #ffffff;
                       font-family: verdana, arial;
                     }
    
        a:link       { color: #666666;
                       text-decoration: underline;
                     }
        a:visited    { color: #444444;
                       text-decoration: underline;
                     }
        a:hover      { color: #666666;
                       text-decoration: none;
                     }
        a:active     { color: #660000;
                       text-decoration: none;
                     }
    
        table.files  { background-color: #222222;
                       border: 2px solid #cccccc;
                       border-spacing: 1px;
                       width: 480px;
                     }
        th.files     { background-color: #4466aa;
                       color: #ffffff;
                       font-size: 11pt;
                       font-weight: bold;
                       text-align: left;
                       padding: 2px;
                     }
        td.files     { background-color: #eeeeee;
                       color: #666666;
                       font-size: 9pt;
                       font-weight: normal;
                       padding: 6px;
                     }*/
      -->
      </style>
    </head>
    <body>
    <h2><?php if ($show_path == 1) { echo "Posizione: "; echo $path; } else { echo "Contenuto della Directory..."; } ?></h2>
    <div class="list">
    <table summary="Directory Listing" cellpadding="0" cellspacing="0">
    <thead><tr><th class="n">Nome</th><th class="m">Ultima Modifica</th><th class="s">
        Peso</th><th class="t">Tipo</th></tr></thead>
    
    <tbody>
    <tr><td class="n"><a href="../">Cartella Precedente</a>/</td><td class="m">&nbsp;</td><td class="s">- &nbsp;</td><td class="t">
        Cartella</td></tr>
    <tr><td class="n"><?php
    $dirs = array();
    $files = array();
    
    $dir = dir($path);
    while ($entry = $dir->read()) {
      if (/*$entry != "." &&*/ substr($entry, -4) != ".php") {
        if (is_dir($entry)) {
          if ($entry != ".." || $show_dotdirs){
            $dirs[] = $entry;
          }
        } else {
          $files[] = $entry;
        }
      }
    }
    $dir->close();
    
    sort($dirs);
    foreach ($dirs as $dir) {
      echo '<a href="' . $dir . '">' . $dir . "</a><br />\n";
    }
    
    sort($files);
    foreach ($files as $file) {
      echo '<a href="' . $file . '">' . $file . "<br />\n";
    }
    ?></td><td class="m"><?php
    // il file da verificare.
    $modifica = $file;
    // variabile che prende l&#8217;informazione.
    $last_time_modified = filemtime($modifica);
    // formatta la data
    $last_mod = /*"Ultima modifica " .*/ date("m/j/Y h:i", $last_time_modified);
    print $last_mod;
    ?></td><td class="s"><?php
    function filesize_format($file) {
            if($file < pow(1024, 1)) return       $file.                 "B";
        elseif($file < pow(1024, 2)) return round($file/pow(1024, 1), 3)."Kb";
        elseif($file < pow(1024, 3)) return round($file/pow(1024, 2), 3)."Mb";
        elseif($file < pow(1024, 4)) return round($file/pow(1024, 3), 3)."Gb";
    }
    echo filesize_format($file);
    /*$strimmagine = file_get_contents($file);
    $dimensione = strlen($strimmagine);
    echo ("$dimensione");*/
    ?></td><td class="t"><?php 
    echo filetype($file);  // file 
    ?></td></tr>
    </tbody>
    </table>
    </div>
    <div class="foot"></div>
    </body>
    </html>
    

    In pratica dovrebbe essere così:

    |-----------------------------------------------------------------------------------|
    |        Nome        |        Ultima Modifica        |        Peso        |        Tipo    |
    |-----------------------------------------------------------------------------------|
    |    Nome Cartella    |         20/04/1965 20:30    |        120Mb        |    Cartella    |
    |-----------------------------------------------------------------------------------|
    |    Nome File        |        21/03/2008 04:30    |        12Kb        |    image/png    |
    |-----------------------------------------------------------------------------------|
    

    Grazie.Ciao Davide!

    PS: Scusatemi se ho sbagliato funzione, ma non ho ancora capito bene come vada il Forum! 😊

  • Accedi

  • Non hai un account? Registrati

  • Accedi o registrati per effettuare la ricerca.
  • Primo post
    Ultimo post
Home Accedi Registrati
Menu
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.