php中fckeditor的使用
php中fckeditor的使用fckeditor果然超级强悍。
目前使用2.6版本
这里还关系到数据表中存什么样的数据
1、纯文本,可能有\n
2、标准html文本,自然会把<等换成<等
3、自定义文本,
我决定用html文本,要检查<script>标签,不能有
关于fckeditor\fckconfig.js文件修改
关于fckeditor\editor\filemanager\connectors\php\configs.php
开始相关的几句话改成:
$Config['Enabled'] = true ;
//xiye20080701,全路径修改
if (!defined('ROOT_PATH'))
define('ROOT_PATH','../../../../../');
require_once(ROOT_PATH . 'inc/global.php');
$temppath ='upload/images/signup/'. Sys::getPathByDate();
//生成路径
Sys::checkdir(ROOT_PATH_DIR_NORMAL . $temppath);
//按照fck要求定义根路径
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/'.$temppath ;
以上代码中Sys::getPathByDate()是一个返回2008/07/01/之类的函数
Sys::checkdir(ROOT_PATH_DIR_NORMAL . $temppath);是生成c:\php\php2\之类文件目录的函数
这样随时间不同,上传的文件会保存到不同文件夹下,免得膨胀。
页:
[1]