主题:  请问能不能把以下PHP程序转成ASP程序?

Zooi

职务:普通成员
等级:1
金币:0.0
发贴:104
#12005/12/13 15:12:02
因为本人对PHP一窍不通,只有对ASP有一知半解,想问问网络高手,能不能把以下的PHP程序转成ASP!!
----------------------------------------------------------------------------------------------------------------------
<?php

$MAXIMUM_FILESIZE = 1024 * 200; // 200KB
$MAXIMUM_FILE_COUNT = 10; // ±£?÷2??òy?÷-Tó1?"- 10 3???o?
echo exif_imagetype($_FILES['Filedata']);
if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./temporary/".$_FILES['Filedata']['name']);
$type = exif_imagetype("./temporary/".$_FILES['Filedata']['name']);
if ($type == 1 || $type == 2 || $type == 3) {
rename("./temporary/".$_FILES['Filedata']['name'], "./images/".$_FILES['Filedata']['name']);
} else {
unlink("./temporary/".$_FILES['Filedata']['name']);
}
}
$directory = opendir('./images/');
$files = array();
while ($file = readdir($directory)) {
array_push($files, array('./images/'.$file, filectime('./images/'.$file)));
}
usort($files, sorter);
if (count($files) > $MAXIMUM_FILE_COUNT) {
$files_to_delete = array_splice($files, 0, count($files) - $MAXIMUM_FILE_COUNT);
for ($i = 0; $i < count($files_to_delete); $i++) {
unlink($files_to_delete[$i][0]);
}
}
print_r($files);
closedir($directory);

function sorter($a, $b) {
if ($a[1] == $b[1]) {
return 0;
} else {
return ($a[1] < $b[1]) ? -1 : 1;
}
}
?>



{ 在指尖上绽放的花朵 }

职务:普通成员
等级:5
金币:14.0
发贴:3209
#22005/12/17 17:24:59
上传。。。?

去找个 ASP 的无组件上传 。。。?



circle

职务:普通成员
等级:1
金币:0.0
发贴:189
#32007/2/5 13:32:49
为什么要改asp,php windows下面也可以运行啊