我想转换vb这段代码

时间:2012-04-09 07:13:26

标签: php asp.net vb.net

我想转换vb这段代码

<?php
// Where the file is going to be placed
$target_path = "uploads/";

/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
    echo "filename: " .  basename( $_FILES['uploadedfile']['name']);
    echo "target_path: " .$target_path;
}
?>

请更清楚地解释您的情景。

1 个答案:

答案 0 :(得分:0)

谷歌它找到了很多关于“如何使用asp.net上传文件”的代码示例。

有些如下:

通过示例&amp;教程,并根据您的需要对其进行更改。

希望有所帮助:)