易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP生成EXCEL,可区分数值与字符串

这是个在别人的基础上做修改的代码,添加了 判断单元格值是否为数值,是的话,将该单元格的类型转成 Number,避免生产的EXCEL中没法进行数值的加减。。。
<?php
/**
* Simple excel generating from PHP5
*
* This is one of my utility-classes.
*
* The MIT License
*
* Copyright (c) 2007 Oliver Schwarz
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* from, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* @package Utilities
* @author Oliver Schwarz <oliver.schwarz@gmail.com>
* @version 1.0
*/
/**
* Generating excel documents on-the-fly from PHP5
*
* Uses the excel XML-specification to generate a native
* XML document, readable/processable by excel.
*
* @package Utilities
* @subpackage Excel
* @author Oliver Schwarz <oliver.schwarz@vaicon.de>
* @version 1.0
*
* @todo Add error handling (array corruption etc.)
* @todo Write a wrapper method to do everything on-the-fly
*/
class MyClass_ExcelXML
{
/**


相关文档:

绿色php资源网站正式成立

 中国第一档绿色PHP资源分享门户,专注于创新和原创类源码php资源,原创视频php资源,原创典型模块php资源,原创php开源资源,原创php教程资源,原创网站模板资源 。网站地址 http://www.phpzy.com/
绿色php资源 ......

php 几种排序方式

1.冒泡排序
function m_sort($arr)
{
    $l = count($arr);
    if($l==0) return false;
  
    for($i=0;$i<$l-1;$i++)
    {
        for($j=$i+1;$j<$l-1;$j++)
     ......

php curl的几个例子

使用PHP的cURL库可以简单和有效地去抓网页。你只需要运行一个脚本,然后分析一下你所抓取的网页,然后就可以以程序的方式得到你想要的数据
了。无论是你想从从一个链接上取部分数据,或是取一个XML文件并把其导入数据库,那怕就是简单的获取网页内容,cURL 是一个功能强大的PHP库。
PHP中的CURL函数库(Client URL Librar ......

火车头discuz6.1完美采集的php接口文件

 
火车头官方提供的discuz6.1的php接口比较粗糙,基本不能满足需要,本人在采集的工作中使用的采集接口文件如下:
PS:对原文件的修改较大,程序中注释已经很详尽,这里就不多说了。
<?php
// header('Content-Type:text/html;charset=UTF-8');
//if(function_exists("mb_convert_encoding")){ ......

PHP将全角空格转成半角, 并去除头尾空格

<?php
/* 字体转换
$content 内容
$to_encoding 目标编码,默认为UTF-8
$from_encoding 源编码,默认为GBK
*/
function mbStrreplace($content,$to_encoding="UTF-8",$from_encoding="GBK") {
$content=mb_convert_encoding($content,$to_encoding,$from_encodin ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号