PHP创建excel文件简单的方法
<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=php100.xls");
/* echo "A1\t B1\t C1\n";
echo "A1\t B1\t C1\n";
echo "A1\t B1\t C1\n";
*/
?>
<!--*********************************************报表****************************************************-->
<table width="444" height="155" border="1">
<tr>
<td><font color=red>报表</font></td>
</tr>
<tr>
<td>姓名</td>
<td>年龄</td>
<td>性别</td>
</tr>
<tr>
<td>张三</td>
<td>20</td>
<td>男</td>
</tr>
<tr>
<td>李四</td>
<td>21</td>
<td>女</td>
</tr>
<tr>
<td>王五</td>
<td>22</td>
<td>男</td>
</tr>
<tr>
<td>齐迹</td>
<td>23</td>
<td>女</td>
</tr>
</table>
<!--*************************************************************************************************-->
相关文档:
<?php
$link=mysql_connect("localhost","root","root");
$db=mysql_select_db("bustest",$link);
$sql1="select name from info group by name order by id asc";
print("<table border='1'>");
$res1=mysql_query($sql1);
while($row1=mysql_fetch_array($res1)){
$name=$row1["name"];
$sql2="select i ......
<?php
//分页
$link=mysql_connect("localhost","root","root");
$db=mysql_select_db("bustest",$link);
$res=mysql_query("select * from info");
//一共多少条
$count=mysql_num_rows($res);
//每页5条信息
$perpage=5;
//一共多少页
$pagecount=ceil($count/$perpage);
//传过来的页数
$pagenum=$_REQUE ......
在配置eventum的邮件服务的时候,始终不能发邮件。抓包后发现根本就没有连接到邮件服务器。再一查,原来是服务器么有
安装IMAP。下面是安装前找到的资料~~~
【转载】
安装sugarcrm,如果你不安装imap,那么你就无法使用的他的邮件功能,他的邮件功能是通过imap去读远程的邮件。
为了这个模块,我可是研究了一个下午, ......
<?php
$array[] = array("id"=>20,"name"=>"li");
$array[] = array("id"=>21,"name"=>"ai");
$array[] = array("id"=>20,"name"=>"ci");
$array[] = array("id"=>22,"name"=>"di");
foreach ($array as $key=>$value){
$age[$key] = $value['id'];
}
array_ ......
php.ini 的搜索路径如下(按顺序):
* SAPI 模块所指定的位置(Apache 2 中的 PHPIniDir 指令,CGI 和 CLI 中的 -c 命令行选项,NSAPI 中的 php_ini 参数,THTTPD 中的 PHP_INI_PATH 环境变量)
*HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath(Windows 注册表位置)
&nb ......