liwya 发表于 2017-3-4 07:59:42

php 代码小计

  1、关于PHP重定向
方法一:header("Location:index.php");
方法二:echo"<script>window.location=\"$PHP_SELF\";</script>";
方法三:echo"<METAHTTP-EQUIV=\"Refresh\"CONTENT=\"0;URL=index.php\">";
  5、php生成excel文档
<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo"test1\t";
echo"test2\t\n";
echo"test1\t";
echo"test2\t\n";
echo"test1\t";
echo"test2\t\n";
echo"test1\t";
echo"test2\t\n";
echo"test1\t";
echo"test2\t\n";
echo"test1\t";
echo"test2\t\n";
?>
页: [1]
查看完整版本: php 代码小计