我正在使用FPDF创建pdf .Pdf产生完美,pdf也可通过电子邮件发送.但我也想发送正文消息.我尝试过身体信息.示例精细文本消息This is text message from shohag但只有pdf附件可用且正文为空.这是我的代码.
function send_pdf_to_user(){
if($_REQUEST['action'] == 'pdf_invoice' ){
require('html2pdf.php');
$pdf=new PDF_HTML();
$pdf->SetFont('Arial','',11);
$pdf->AddPage();
$text = get_html_message($_REQUEST['eventid'], $_REQUEST['userid']);
if(ini_get('magic_quotes_gpc')=='1')
$text=stripslashes($text);
$pdf->WriteHTML($text);
//documentation for Output method here: http://www.fpdf.org/en/doc/output.htm
$attach_pdf_multipart = chunk_split( base64_encode( $pdf->Output( '', 'S' ) ) );
//define the receiver of the email
$to = 'monirulmask@gmail.com';
//define the subject of the email
$subject = 'Test Invoice';
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate …Run Code Online (Sandbox Code Playgroud) 我正在尝试对LINQ执行这个简单的SQL查询.但它给我错误.
这是需要转换为LINQ的SQL查询
DECLARE @groupID int
SET @groupID = 2
SELECT *
FROM dbo.Person p
LEFT JOIN dbo.PersonGroup pg ON ( p.PersonID = pg.PersonID AND pg.GroupID = @groupID)
Run Code Online (Sandbox Code Playgroud)
忽略@groupID.它将作为LINQ查询的函数参数提供.
这是我试过的LINQ查询.
from p in Person
join pg in PersonGroup on new { p.PersonID, groupID } equals new { pg.PersonID, pg.GroupID } into t
from rt in t.DefaultIfEmpty()
Run Code Online (Sandbox Code Playgroud)
其中groupID作为函数参数提供.GroupID和PersonID都是int.但它给了我以下错误,
Error 2 The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'GroupJoin'.
Run Code Online (Sandbox Code Playgroud)
很少的帮助将不胜感激.