ThinkPHP中调用FCKeditor编辑器的代码


应用步骤:
1、下载FCKeditor2.x版本,将解压后的文件夹FCKeditor复制到ThinkPHP文件夹下的Vendor目录下,以便符合THinkPHP的第三方类库引入规则。
2、修改参数:
首先,用EditPlus等软件打开FCKeditor目录下的fckeditor_php5.php文件,找到第130行。出现内容如下:

阅读全文

phpexcel读写xls文件实现程序

<?php
include_once('PHPExcel.php');
//read excel file;
$PHPExcel = new PHPExcel();    
$PHPReader = new PHPExcel_Reader_Excel5();
$PHPExcel = $PHPReader->load('/home/yuanjianjun/taobao_cat.xls');
$currentSheet = $PHPExcel->getSheet(0);
$allColumn = $currentSheet->getHighestColumn();
$allRow = $currentSheet->getHighestRow();
for($currentRow = 1; $currentRow<=$allRow; $currentRow++){
   for($currentColumn='A'; $currentColumn<=$allColumn; $currentColumn++){  
    $address = $currentColumn.$currentRow;  
    echo $currentSheet->getCell($address)->getValue()."t";  
   }
   echo "n";
}

阅读全文