![](/img/trans.png)
[英]Converting xlsx to pdf using PHPExcel and download that pdf . work Fine on localhost
[英]Generating pdf error, although work fine on github, not in localhost
所以我一直致力於卡片生成表格html到pdf。 我終於得到了由mozilla人Mozilla Kerala制作的github項目
它在給定的鏈接上運行正常。 但是,當我在我的localhost下載它時,我得到這樣的東西。 當我點擊生成卡片。
警告:第1302行的C:\\ xampp \\ htdocs \\ demo \\ vendor \\ mpdf \\ classes \\ cssmgr.php中的非法字符串偏移量'ID'
警告:無法在第1302行的C:\\ xampp \\ htdocs \\ demo \\ vendor \\ mpdf \\ classes \\ cssmgr.php中將空字符串分配給字符串偏移量
這是cssmgr.php源代碼中的一行。
1297 $classes = array();
1298 if (isset($attr['CLASS'])) {
1299 $classes = preg_split('/\s+/', $attr['CLASS']);
1300 }
1301 if (!isset($attr['ID'])) {
1302 $attr['ID'] = '';
1303 }
請告訴我是否有任何調整要做。 謝謝
我已經設法通過添加來解決PHP 7.1上的這個問題
$attr = is_array($attr) ? $attr : [];
到第1296行的/mpdf60/classes/cssmgr.php。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.