FCKeditor Editor is a support multi-language multi-page online editor, he can support asp,asp.net,jsp,php, but it is not the default PHP but ASP oh, let's see how to configure the FCKeditor editor in PHP.
Download after decompression for the folder weight loss:
Delete all files except Fckconfig.js, Fckeditor.js, Fckstyles.xml, fcktemplates.xml,fckeditor.php Five files under the/fckeditor/directory
Delete Directory/editor/_source,_testcases (basically, all folders or files beginning with _ are optional),
Delete all directories under/editor/filemanager/browser/default/connectors/except for the PHP directory
Delete all directories except PHP directory under/editor/filemanager/upload/
Delete all files under/editor/lang/except En.js, Zh.js, zh-cn.js three files
One: Modified file upload language for PHP
Open Fckconfig.js
Found it:
var _filebrowserlanguage = ' asp '
var _quickuploadlanguage = ' asp '
Change to:
var fckconfig.defaultlanguage = ' ZH-CN ';
var _filebrowserlanguage = ' php '
var _quickuploadlanguage = ' php '
Second: Enable PHP file Upload
1: Enable Filebrowser:
Open fckeditor/editor/filemanager/connectors/php/config.php (Chinese support is not good here, you can have to deal with the Chinese name on your own)
To enable file uploads:
Found it:
$Config [' Enabled '] = False
Change to:
$Config [' Enabled '] = True
To set the upload directory:
Found it:
$Config [' userfilespath '] = '/userfiles/'
Change to:
$Config [' userfilespath '] = ' your own project path '
2: Enable Quickupload
Open fckeditor/editor/filemanager/upload/php/config.php
To enable file uploads:
Found it:
$Config [' Enabled '] = False
Change to:
$Config [' Enabled '] = True
To set the upload directory:
Found it:
$Config [' userfilespath '] = '/userfiles/'
Change to:
$Config [' userfilespath '] = ' your own project path '
Test
Place FCKeditor in the Web site root directory
Inside the php file, contains the/fckeditor/fckeditor.php file
The code is as follows |
Copy Code |
Contains the FCKeditor class Include (".. /fckeditor/fckeditor.php "); Set Editor Path $sBasePath = "/fckeditor/"; Create a FCKeditor, the name of the form is ipaddr $oFCKeditor = new FCKeditor (' ipaddr '); $oFCKeditor->basepath = $sBasePath; Set the form initial value $oFCKeditor->value = ' This is some sample text'; $oFCKeditor->create (); You can also set $oFCKeditor->width $oFCKeditor->height $oFCKeditor->toolbarset |
OK, so that our PHP configuration FCKeditor tutorial is here, the above mentioned if the upload Chinese name will be garbled, we can search in this site, there are related solutions.
http://www.bkjia.com/PHPjc/631623.html www.bkjia.com true http://www.bkjia.com/PHPjc/631623.html techarticle FCKeditor Editor is a support multi-language multi-page online editor, he can support asp,asp.net,jsp,php, etc., but it is not the default PHP but ASP oh, let's see how in ...