在php中意外的文件结束

时间:2017-02-16 07:41:52

标签: php html

这是我收到的错误消息

  

解析错误:语法错误,第96行的C:\ xampp \ htdocs \ projectwxyz \ include_files \ payment_download.class.php中的文件意外结束   有人可以帮助我吗

if ($query) {

    $message_reciever='jtime@yahoo.com';
    $admin_message_subject = 'pect Payment Information';
    $admin_message = "<div style='background-color:#eeeeee;padding:2%;'>
            <div style='margin-left:10%; margin-right:10%; text-align:center; background-color:white;'>
            <div style='background-color:#9a3bf2; padding-bottom:2%;padding-top:2%;'><img src=\"repertory/img/mainlogo.jpg\" width=\"40px\" height=\"40px\"></div>
            <p><strong><h1>Hi, $message_reciever</h1></strong></p>
                <hr>
            <p>Your payment information has been successfully submited to <a href=\"http://www.pject.com\">pject</a></p>
            <p>Here are your payment information</p>
            <p>Depositors Name: $depositors_name</p>
            <p>Transaction id: $transaction_id</p>
            <p>Bank Paid To: $bank_name</p>
            <p>Email: $email</p>
            <p>Phone Number: $phone</p>
            <p>Department: $department</p>
            <p>Project Material Code: $material_code</p>

            <p>Your download code will be sent to you 20 - 45mins after your payment is confirmed.</p>
            <p>We are more intrested in your Academic success.</p><br>
            <p><strong>Thanks for using our platform. We are more intrested in your Academic success. Let your friends know about Projectwxyz by clicking the facebook share button on our page.</strong></p>
            <a href=\"http://www.pect.com\">Continue.</a>
            </div>
            </div>";

    $message_body = <<<EOD
    $admin_message
            EOD;

    $message_header = "From: no-reply@pect.com\n";
    $message_header .= "MIME-Version: 1.0\n";
    $message_header .="Content-type: text/html; charset=iso-8859-1 \n";
    @mail($message_reciever, $admin_message_subject , $message_body, $message_header);

    echo '<div class="success_message"> Your payment information was sent successfully. A download code will be sent to your email 20 - 45mins after your payment is confirmed.</div>';

}else{

    echo '<div class="danger_message"> An error occurred. Try again later.</div>';

}

1 个答案:

答案 0 :(得分:0)

在最后<?php if ($query) { $message_reciever = 'jtime@yahoo.com'; $admin_message_subject = 'pect Payment Information'; $admin_message = "<div style='background-color:#eeeeee;padding:2%;'> <div style='margin-left:10%; margin-right:10%; text-align:center; background-color:white;'> <div style='background-color:#9a3bf2; padding-bottom:2%;padding-top:2%;'><img src=\"repertory/img/mainlogo.jpg\" width=\"40px\" height=\"40px\"></div> <p><strong><h1>Hi, $message_reciever</h1></strong></p> <hr> <p>Your payment information has been successfully submited to <a href=\"http://www.pject.com\">pject</a></p> <p>Here are your payment information</p> <p>Depositors Name: $depositors_name</p> <p>Transaction id: $transaction_id</p> <p>Bank Paid To: $bank_name</p> <p>Email: $email</p> <p>Phone Number: $phone</p> <p>Department: $department</p> <p>Project Material Code: $material_code</p> <p>Your download code will be sent to you 20 - 45mins after your payment is confirmed.</p> <p>We are more intrested in your Academic success.</p><br> <p><strong>Thanks for using our platform. We are more intrested in your Academic success. Let your friends know about Projectwxyz by clicking the facebook share button on our page.</strong></p> <a href=\"http://www.pect.com\">Continue.</a> </div> </div>"; $message_body = <<<EOD $admin_message EOD; $message_header = "From: no-reply@pect.com\n"; $message_header .= "MIME-Version: 1.0\n"; $message_header .= "Content-type: text/html; charset=iso-8859-1 \n"; @mail($message_reciever, $admin_message_subject, $message_body, $message_header); echo '<div class="success_message"> Your payment information was sent successfully. A download code will be sent to your email 20 - 45mins after your payment is confirmed.</div>'; } else { echo '<div class="danger_message"> An error occurred. Try again later.</div>'; }

之前不应该有空格
const