php Why pdf which we send on email not open?

前端 未结 2 1267
旧巷少年郎
旧巷少年郎 2021-01-16 09:14
            $NameFile = \'15_10_2014_.pdf\';
            $File = \'./TEMP/15_10_2014_.pdf\';
            $to = \'test2@test.com\';
            $From = \"test@test.co         


        
2条回答
  •  囚心锁ツ
    2021-01-16 09:48

    You need get content file:

    $openfile = fopen($File, "rb");
    $data = fread($openfile,  filesize( $filename ) );
    fclose($openfile);
    $File = $data;
    

    Enjoy!

提交回复
热议问题