FCKeditor 的配置和使用方法(for PHP)
FCKeditor 是一个十分强大的网页文本编辑器,它支持多种脚本编程语言(包括 PHP)和支持多国语言。
FCKeditor 截至 2008年4月6日,其最新版本是 2.6RC,RC 就是 Release Candidate,修订后的候选版本,很可能作为该版本的稳定版在未来发布。目前的最新的稳定版(Latest Stable)是 2.5.1。我们可以到他的官方网站上去下载 http://www.FCKeditor.net 合适的版本,开源、免费的。
本文介绍 PHP 中的配置方法,其他语言的配置方法和它是基本一样的。
〇、假设网站的目录为:
\website_root
\index.php
\FCKeditor
一、调用FCKeditor 的两种方法
1、通过创建实例来调用
在 index.php 文件中,调用它的代码,把下面的代码加在需要编辑器的地方:
<Form name="frm1">
<?php
//引用FCKeditor.php这个文件,基本的类和数据结构都在这里
include_once("FCKeditor/fckeditor.php");
//创建FCKeditor对象的实例。myFCKeditor即提交后,接收数据页面 $_POST['myFCKeditor']使用
$FCKeditor=new FCKeditor('myFCKeditor');
//FCKeditor所在的位置,这里它的位置就是'FCKeditor' 文件夹
$FCKeditor->BasePath='./FCKeditor/';
//工具按钮设置
$FCkeditor->ToolbarSet='Default';
//设置它的宽度
$FCKeditor->Width='100%';
//设置它的高度
$FCKeditor->Height='300px';
//生成
&
相关文档:
在php中计算时间差有时候是件麻烦的事!不过只要你掌握了日期时间函数的用法那这些也就变的简单了:
一个简单的例子就是计算借书的天数,这需要php根据每天的日期进行计算,下面就来谈谈实现这种日期计算的几种方法:
(1) 如果有数据库就很容易了!若是MSSQL可以使用触发器!用专门计算日期差的函数datediff()便可 ......
用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 ......
Perl is a language often associated with text processing and CGI. PHP is
a language often associated with dynamic Web pages. Both are very popular
with Web developers. Often, each of these languages is used at the expense of
the other. Hard-core Perl developers would love to develop everyth ......
1、创建 和 修改 数组
PHP中使用array来创建一个数组:
array( key=>value , key=>value …… )
例子:
$arr = array (3,5,7,9,6);
&nb ......