Sublime directory Surf the web anonymous Pagerank Monitor


easy upload along with attachment mailer script

wbdgn
Tue 16 May 2006, 08:13 pm GMT +0300
I downloaded your easy upload and attachment mailer scripts.  I got the multi upload example to work with no alterations except assigning the path and extensions to allow.


then I made a duplicate and I tried to use the upload and mail example but couldn\'t get it to work with multiple uploads.  there was no example for multi uploads and attachments.

I added these lines of code to the upload_multi_files function inside the if statement for move_upload
------------------------------------------
$full_path = $this->file_copy;
       $my_mail->create_attachment_part($full_path);
$my_mail->process_mail();
$my_mail->del_temp_file($full_path);

--------------------------------------------------------

but when I run the test I get this error message

Fatal error: Call to a member function on a non-object in ............\\multi_file_mailer.php on line 53

thanks for your help

olaf
Tue 16 May 2006, 08:52 pm GMT +0300
Hello,

check this code from the example:
Code:
<?php
if ($my_upload->upload()) {
$full_path $my_upload->upload_dir.$my_upload->file_copy;
$my_mail->create_attachment_part($full_path);
$my_mail->process_mail();
$my_upload->del_temp_file($full_path); // the file is not needed anymore
}
$full_path is the (single) uploaded file. This path is used in the next ro to build an attachment.

I don't think that easy for you to use the multi file upload for sending more than one attachement.

I think its easier to have the code for the single upload x times. In this case you need to create x objects.

It looks like that handling classes is your problem, maybe its time to learn something about objects:
http://nl3.php.net/manual/en/language.oop.php Visit through proxy

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional