0
我需要asp.net相當於這個源代碼塊。Markitup圖片上傳在asp.net中相當於php源代碼
/* The following is a very basic PHP script to handle the upload. One might also
* resize the image (send back the *new* size!) or save some image info to a
* database. Remember that you can modify the widget to include any data you'd like
* submitted along with the uploaded image.
*/
$upload_dir = '/var/www/vhosts/test/htdocs/uploads/';
$upload_path = $upload_dir . basename($_FILES['inline_upload_file']['name']);
$response = array();
if (move_uploaded_file($_FILES['inline_upload_file']['tmp_name'], $upload_path))
{
$info = getImageSize($upload_path);
$response['status'] = 'success';
$response['width'] = $info[0];
$response['height'] = $info[1];
$response['src'] = 'http://'
. $_SERVER['HTTP_HOST']
. substr(realpath($upload_path), strlen(realpath($_SERVER['DOCUMENT_ROOT'])));
}
else
{
$response['status'] = 'error';
$response['msg'] = $_FILES['inline_upload_file']['error'];
}
echo json_encode($response);
我需要一個大的大房子有用。 – kapa 2012-02-18 09:58:37
我會先學習ASP.net並做一些實際的編碼。 – DarthJDG 2012-02-18 17:28:26