SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem Uploading Files

    Hi all,

    Please could you help me here.
    I want to upload files to a folder on server and then email them.

    I always get the error message.

    Here is my code so far:

    PHP Code:
      <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
       <%
          
          if 
    request.querystring("action") = "Send" then
          
          Set Upload 
    Server.CreateObject("Persits.Upload.1")
              
    Upload.Save "www\docs\"
              
              response.write "
    test"
              
          Set Mailer = Server.CreateObject("
    CDONTS.NewMail")
          With Mailer
              .To = "
    info@mysite.ie"
              .From = "
    test"
              .Subject = "
    test"
              .Body = "
    attachments"
              For Each File in Upload.Files
              .AttachFile("
    www\docs\" & File.Path)
              Next
              .Send
          end with
          else response.write "
    error"
          
      end if
      
      %>
      <!DOCTYPE HTML PUBLIC "
    -//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      
    <html>
      <
    head>
      <
    title>Untitled Document</title>
      <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </
    head>
      
      <
    body>
     <
    form action="<%= Request.ServerVariables("SCRIPT_NAME") %>?action=Send" method="post" enctype="multipart/form-data" name="form1">
        <
    input type="file" name="file">
        <
    input type="submit" name="Submit" value="Send">
      </
    form>
      </
    body>
      </
    html

  2. #2
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What's the error?

    I did notice:

    Code:
    .AttachFile("wwwdocs" & File.Path)
    should be...
    Code:
    .AttachFile("www\docs\" & File.Path)

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2004
    Location
    dublin
    Posts
    2,036
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Changed that but get page not found error.

    Why is this?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •