email - PHP: Get input and send as attachment in phpmailer -


i using phpmailer https://github.com/synchro/phpmailer send images attachments in emails.

but it's not working when this:

$photo = $_get['photo_send']; $photo = realpath($photo);  var_dump($photo); $mail->addattachment($photo);         // add attachments 

the image path shows in url:

photo_send=images%2ffullscreen%2f1.jpg%3flol%3dlol 

when put path directly in addattachment works.

if can suggest or give advise, i'd appreciate it!

i said in comments, path not ok.

you said, if output $photo right after $_get images/fullscreen/1.jpg?lol=lol

when discovered need remove ?lol=lol, found problem.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -