-4

我想转换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;
}
?>

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

4

1 回答 1

0

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

一些如下:

只需浏览示例和教程,然后对其进行更改以满足您的需求。

希望能帮助到你 :)

于 2012-04-09T07:29:05.203 回答