first question

when submitting a mime mailer with attachments i have the following snippet which should read the file, i can get the file name, size and type but as soon as i read it it gives me an error that it cant find it on the server. do i need to copy it first to the webserver and the read it from there?

if ($_FILES['somefile']['name']) {

     $filename3=  basename($_FILES['somefile']['name']);
	 $filetype3 = $_FILES['somefile']['type'];
	 $filesize3 = $_FILES['somefile']['size'];
	 $fp3 = fopen($filename3,"r");
	 $fileinc3 = fread($fp3,$$filesize3);
	 $fileinc3 = chunk_split(base64_encode($fileinc3));
	 $file3 = 'filename = '.$filename3 . 'filetype=' .$filetype3 .'filesize = '.$filesize3 .'info: '.$fileinc3;
 } else $fileinc3 = "no attatchment"

so in short when creating a mime mailer with attachments is it neccesary to copy the files first to the webserver before reading it?

and my second question, where is the "resolve thread" button that use to be at the bottom of the thread (i know such a stupid question)

thanks for any help

    if it is uploaded from a form, the file is on the server during the execution of the script, and its location is $_FILES['file']['tmp_name']

    and resolve thread is now located in the thread tools menu at the top of the posts

      did try it but didnt work probably had a type o think i had $FILES['file']['tmpname'] instead of $FILES['file']['tmp_name']

      anyway copied it to the webserver now.

      thanx for the help

        Write a Reply...