Codice PHP:
$extlimit = "no"; //Do you want to limit the extensions of files uploaded
$limitedext = array(".gif",".jpg",".png",".jpeg"); //Extensions you want files uploaded limited to.
$sizelimit = "no"; //Do you want a size limit, yes or no?
$sizebytes = "200000"; //size limit in bytes
$dl = "/public/cartella"; //url where files are uploaded
$absolute_path = "d:/inetpub/webs/cartella"; //Absolute path to where files are uploaded
$websiteurl = "http://www.prova.it"; //Url to you website
$websitename = "sssss";
if (!isset($action))
{
$action = "";
}
switch($action)
{
default:
echo"
<a href=$PHP_SELF?</a>";
$dir = opendir($absolute_path);
while($file = readdir($dir))
{
if (($file != "..") and ($file != "."))
{
?>
$files = substr($file,0,strpos($file,array_pop(explode('.',$file)))-1);
$list .= "<tr><td width=550>[url='$dl/$file']$files [/url]</center></td></tr>";
}
}
<?
$list .= "</table>";
echo $list;
break;
}
?>