我现在要调用fckeditor:要根目录下,我调用是没有问题的:
<head>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
</head>
<body>
内容:
<?php
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = ''; // 设置表单初始值
// 还可设置以下部分(“=”包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; // 编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//
$oFCKeditor->Create(); // 调用类中方法,必须
?>
</body>
上面代码没有问题,现在在根目录下有一个文件夹Admin,里面有一个test.php文件,我要调用放在根目录下的FCKeditor,我是这样调用:
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
<!-- -->
</head>
<body>
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = ''; // 设置表单初始值
// 还可设置以下部分(“=”包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; // 编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//
$oFCKeditor->Create(); // 调用类中方法,必须
?>
</body>这里我<head>是引用js的路径我改了很多次,都没有用。。请问怎么改啊?谢谢
<head>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
</head>
<body>
内容:
<?php
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = ''; // 设置表单初始值
// 还可设置以下部分(“=”包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; // 编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//
$oFCKeditor->Create(); // 调用类中方法,必须
?>
</body>
上面代码没有问题,现在在根目录下有一个文件夹Admin,里面有一个test.php文件,我要调用放在根目录下的FCKeditor,我是这样调用:
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
<!-- -->
</head>
<body>
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = ''; // 设置表单初始值
// 还可设置以下部分(“=”包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; // 编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
$oFCKeditor->Config['SkinPath'] = '/fckeditor/editor/skins/silver/'; // 设置编辑器皮肤
//==================================================================================//
$oFCKeditor->Create(); // 调用类中方法,必须
?>
</body>这里我<head>是引用js的路径我改了很多次,都没有用。。请问怎么改啊?谢谢
$BasePath = "/fckeditor/"; // 编辑器路径
<script type="text/javascript" src="../fckeditor/fckeditor.js"></script>
</head>
<body>
<?php
include("fckeditor/fckeditor.php"); // 包含fckeditor类,fckeditor目录放在网站根目录下
$BasePath = "fckeditor/"; // 编辑器路径
$oFCKeditor = new FCKeditor('CreMer'); // 创建一个fckeditor对象,表单的名称为CreMer
$oFCKeditor->BasePath = $BasePath;
$oFCKeditor->Value = ''; // 设置表单初始值
// 还可设置以下部分(“=”包含部分),并非必须:
//==================================================================================//
$oFCKeditor->Width = '800'; // 编辑器宽度,类中有默认值,如果不想修改可不管此项
$oFCKeditor->Height= '300'; // 同width,此处为高$oFCKeditor->ToolbarSet
$oFCKeditor->ToolbarSet = 'Default'; // 默认编辑器工具栏有Basic(基本工具)和Default(所有工具)两种选择,另外还可以自己建立工具栏
//==================================================================================//
$oFCKeditor->Create(); // 调用类中方法,必须
?>