關於部落格
  • 107422

    累積人氣

  • 0

    今日人氣

    2

    追蹤人氣

FLASH AS3 webcam 2 jpg

伺服器端:ASPX
<%@ Page Language="C#"%>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script language="C#" runat="server">

string  saveToFolder = "uploadData";
private void Page_Load(object sender, System.EventArgs e)
{
 
  HttpFileCollection uploadedFiles =  Request.Files;
  string Path = Server.MapPath(saveToFolder);
  for(int i = 0 ; i < uploadedFiles.Count ; i++)
  {
    HttpPostedFile F = uploadedFiles[i];
    if(uploadedFiles[i] != null && F.ContentLength > 0)
    {  
      string newName = F.FileName.Substring(F.FileName.LastIndexOf("") + 1);
      F.SaveAs(Path + "/" + newName);
      Response.Write(Path +""+ newName);
     }
   }
}
</script>

PHP:
<?php

$upLoadFolder="D:/uploadFile/";
if(@copy($_FILES['Filedata']['tmp_name'], $upLoadFolder . $_FILES['Filedata']['name'])){
     echo 'OK';
  }else{
    echo 'ERROR';
}

 ?>

相簿設定
標籤設定
相簿狀態