代码之家  ›  专栏  ›  技术社区  ›  chuybenchuy

mPDF htmlpageheader在Windows 10 Apache上显示,但在Centos 7上不显示

  •  0
  • chuybenchuy  · 技术社区  · 7 年前

    <!--mpdf
    <htmlpageheader name="firstpage">
    <table width="100%">
    <tr>
    
    <td width="25%" align="center"><img height="120" width="130" src="img/mcwd-logo.png"></td>
    
    <td align="justify" width="1%"></td>
    
    <td width="50%" style="text-align: center; color:#000000;">
    
    <span style="font-weight: bold; font-size: 12pt; font-family: CenturyGothic;"><i>Republic of the Philippines</i></span><br />
    <span style="color:#365f91; font-weight: bold; font-size: 20pt; font-family: CenturyGothic;">MALAYBALAY CITY WATER DISTRICT</span><br />
    <span style="font-size: 11pt; font-family: CenturyGothic;"><i>Sayre Highway, Sumpong, City of Malaybalay</i></span><br />
    <span style="color:#ff0000; font-size: 11pt; font-family: CenturyGothic;"><i>Tel. No. (088) 813-2552,&nbsp;Fax No. (088) 813-5527,&nbsp;Globe 0977-837-4085</i></span><br />
    <span style="color:#365f91; font-size: 11pt; font-family: CenturyGothic;"><i>Email: mcwd_malaybalay@yahoo.com</i></span><br />
    <span style="color:#538135; font-size: 11pt; font-family: CenturyGothic;"><i>Website: emcwd.gov.ph</i></span>
    
    </td>
    <td width="25%" align="center"></td>
    </tr>
    </table>
    <div style="border-bottom: 1px solid #000000; font-size: 8pt; text-align: left; padding-top: 3mm; ">
    </htmlpageheader>
    
    
    <htmlpageheader name="otherpages" style="display:none">
    <div style="text-align:center"></div>
    </htmlpageheader>
    
    <htmlpagefooter name="myfooter">
    <div style="border-top: 1px solid #000000; font-size: 8pt; text-align: center; padding-top: 2mm; ">
    Page {PAGENO} of {nb}
    </div>
    <div style="font-size: 8pt; text-align: right;">
    Programmed by BVTV
    </div>
    </htmlpagefooter>
    
    <sethtmlpageheader name="firstpage" value="on" show-this-page="1" />
    <sethtmlpageheader name="otherpages" value="on" />
    <sethtmlpagefooter name="myfooter" value="on" />
    mpdf-->';
    

    我使用的是PHP7.1.8和mPDF 6.0。

    1 回复  |  直到 7 年前
        1
  •  0
  •   chuybenchuy    7 年前

    解决了我的问题。

    由于我使用的是PHP 7.1.8和mPDF 6.0,但没有显示我的htmlpageheader,所以我将PHP降级为5.4.16,但保留了mPDF 6.0。

    已成功显示我的htmlpageheader。

    我所做的:

    1. 要从该链接中撤消所有已安装的yum,请执行以下步骤:

    https://www.if-not-true-then-false.com/2010/yum-history-list-info-summary-repeat-redo-undo-new/

    https://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp

    就是这样!