标题不在线工作,但在localhost中工作完美

时间:2016-07-28 04:42:51

标签: php

我正在用php创建一个doc。我的代码在localhost中工作正常,但是当我把它放到网上时它不起作用。我猜标题不能正常工作。如何解决此问题。问题在于在标头中添加内容类型和内容处置。有什么办法以不同的方式添加它们?我的代码如下。

<?php
error_reporting(0);
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment; Filename=Productname.doc");
$str = mb_convert_encoding($str, "EUC-JP", "auto"); 
$conn = oci_connect("NPM_OPL", "NPM_OPL", "192.168.10.35:1521/pdbopl");
?>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style>
        @font-face { font-family: Solaimanlipi; src: url('SolaimanLipi.ttf'); } 
        table {
        border-collapse: collapse;

        font-size-adjust:inherit;
        font-size:12px;
        }

        table, td, th {
        border: 1px solid black;
        }
        th {
        font-weight:normal !important;
        }
</style>

</head>
<body>



<?php
    for($i=0;$i<=$_POST['max_item'];$i++){  
    $check=$_POST['check_'.$i];
    if(!empty($check)){
    $STATUS=$_POST['STATUS_'.$i];   
    $srlno=$_POST['SLNO_'.$i];      
    if($STATUS=='M'){
?>




<?php   



 ?>

0 个答案:

没有答案
相关问题