header Content-Type类型
摘要:<?php$mimetypes = array('ez' => 'application/andrew-inset','hqx' => 'application/mac-binhex40','cpt' => 'application/mac-compactpro','doc' => 'application/msword','bin' => 'application/octet-stream',
阅读全文
posted @
2011-06-30 11:43
网宗
阅读(1050)
推荐(0)
strstr 不错的技巧
摘要:strstr 不错的技巧$aa = "我爸爸是李刚"strstr(($aa,'李刚'));
阅读全文
posted @
2011-06-16 18:52
网宗
阅读(165)
推荐(0)
PHP导出Excel方法
摘要:使用制表符、换行符的方法 制表符”\t”用户分割同一行中的列,换行符”\t\n”可以开启下一行。 <?php header(”Content-Type: application/vnd.ms-execl”); header(”Content-Disposition: attachment; filename=myExcel.xls”); header(”Pragma: no-cache”); header(”Expires: 0″); /*first line*/ echo “hello”.”\t”; echo “world”.”\t”; echo “\t\n”; /*start of
阅读全文
posted @
2011-06-01 21:44
网宗
阅读(649)
推荐(0)
php小技巧--把数组的键和值交换形成了新的数组,查找值取得键
摘要:$cityname = array_flip($city_DB[name]);//把数组的键和值交换形成了新的数组$city_name = array_search($city_id,$cityname,true);//查找值取得键
阅读全文
posted @
2011-06-01 10:58
网宗
阅读(399)
推荐(0)