2017-08-17 108 views
0

我正在將我的程序從Windows 10 Apache轉移到Centos 7服務器。但是它生成的PDF不會顯示第一頁的標題。頁腳顯示,但不顯示標題。mPDF htmlpageheader在Windows 10 Apache上顯示但不在Centos 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: [email protected]</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-->'; 

我使用PHP 7.1.8和mPDF 6.0。

回答

0

解決了我的問題。

也可以幫助別人,所以我會張貼這個解決方案。

由於我使用PHP 7.1.8和mPDF 6.0,但不顯示我的htmlpageheader,我將我的PHP降級到5.4.16,但保留了mPDF 6.0。

成功顯示我的htmlpageheader。

我做了什麼:

  1. 按照步驟,撤消所有已安裝的百勝,從這個鏈接:刪除所有

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

  • 後使用'yum history undo'安裝yum,遵循以下步驟:
  • https://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp

    就是這樣!

    相關問題