Help - Search - Members - Calendar
Full Version: File Uploader
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
AzureGames
CODE
<?php

$lt = 0;

//Open Directory
if ($handle = opendir("./upload/")) {
    echo "<p class='header'>.: Recent Files :.</p>\n";

    //Creates the table
    $dir = "./upload/";
    echo "<table border='0' cellpadding='2' width='700px'>";
    echo "<tr><td><u><b><p class='filename'>Name of File</p></b></u></td>";
    echo "<td><u><b><p class='filename'>Filetype</p></b></u></td>";
    echo "<td><u><b><p class='filename'>File Size (KBs)</p></b></u></td>";
    echo "<td><u><b><p class='filename'>Date Modified</p></b></u></td></tr>";

    // List all the files
    while ($lt<5) {
    while (false !== ($file = readdir($handle, 1))) {
        $extn = substr(strrchr($file, "."), 1);
        $size = filesize("upload/$file") / 10240;
        $time = date('F d, Y :: h:i A',filemtime("upload/$file"));
        $type = filetype("upload/$file");
        $lt+=1;

        if($extn !=="php" && $type !=="dir") {
            echo "<tr><td width='400px'><p class='filename'>$bul <a href=\"upload/$file\">$file</a></p></td>";
            echo "<td width='75px'><p class='extension'>.$extn</p></td>";
            echo "<td width='125px'><p>$size KBs</p></td>";
            echo "<td width='300px'><p>$time</p></td>";
            echo "</td></tr>";
            }
            }
    }
        echo "<tr><td colspan='4'><br /><br /><hr><br /><br />";
            closedir($handle);
    }
?>


This is the PHP code I have for a file uploader I'm trying to work. I've tried this on many other hosts and I thought this might work. However, whenever I view the page, Zymic tries to locate these files and crashes up my browser. Why does this not work on this host?
rachid
I do not know
rachid
please how to work by french

please donnez moi la détail en français svp....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.