第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么我在將 html 頁面導出到 word 時出現(xiàn)錯誤?

為什么我在將 html 頁面導出到 word 時出現(xiàn)錯誤?

PHP
嗶嗶one 2023-09-22 16:31:06
我在嘗試添加表格的新行時遇到錯誤,一切正常,我可以將我的 html 頁面導出到 MS Word。我收到這樣的錯誤Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\exportword2.php:216) in C:\xampp\htdocs\test\exportword2.php on line 217Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\exportword2.php:216) in C:\xampp\htdocs\test\exportword2.php on line 218Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\exportword2.php:216) in C:\xampp\htdocs\test\exportword2.php on line 219Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\exportword2.php:216) in C:\xampp\htdocs\test\exportword2.php on line 220這是我的代碼        <tr>            <td>13. </td>            <td>Upah Pekerja</td>            <td>:</td>            <td>Minimum</td>            <td colspan="4">Rp. 100000</td>        </tr>        <tr>            <td></td>            <td></td>            <td>:</td>            <td>Maximum</td>            <td colspan="4">Rp. 100000</td>        </tr>        <tr>            <td></td>            <td>Upah Pekerja Harian</td>            <td>:</td>            <td>Minimum</td>            <td colspan="4">Rp. 100000</td>        </tr>        <tr>            <td></td>            <td></td>            <td>:</td>            <td>Maximum</td>            <td colspan="4">Rp. 100000</td>        </tr>        <tr>            <td>14.</td>            <td>Sistem Hubungan Kerja</td>            <td colspan="6">:</td>        </tr>        <tr>            <td></td>            <td>a. Untuk Waktu Tertentu</td>            <td colspan="6">: 3 Orang</td>        </tr>        <tr>            <td></td>            <td>b. Untuk Waktu Tidak Tertentu</td>            <td colspan="6">: 3 Orang</td>        </tr>    </table>我已經(jīng)完成導出,直到我添加新的表行,我收到上面的錯誤
查看完整描述

1 回答

?
aluckdog

TA貢獻1847條經(jīng)驗 獲得超7個贊

請參閱文檔:

header() 必須在發(fā)送任何實際輸出之前調(diào)用,無論是通過正常的 HTML 標簽、文件中的空行還是從 PHP 發(fā)送。使用 include、require、函數(shù)或其他文件訪問函數(shù)讀取代碼,并在調(diào)用 header() 之前輸出空格或空行是一個非常常見的錯誤。使用單個 PHP/HTML 文件時也存在同樣的問題。

<?php

// header must be before any sent output?

header("Content-Type: application/vnd.msword");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("content-disposition: attachment;filename=hasilekspor.doc");

??>

<html>

...

</html>


查看完整回答
反對 回復 2023-09-22
  • 1 回答
  • 0 關注
  • 99 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號