How to configure the fckeditor editor in php. Fckeditor is an online multi-language web editor that supports asp, asp.net, jsp, php, and so on. However, it is not php but asp by default, let's take a look at how the fckeditor editor is an online multi-language web editor that supports asp, asp.net, jsp, php, and so on, but it is not php but asp by default, let's take a look at how to configure the fckeditor in php.
Download and decompress the package to remove weight in the folder:
Delete all files except fckconfig. js, FCKeditor. js, fckstyles. xml, fcktemplates. xml, and fckeditor. php in the/fckeditor/directory.
Delete the directory/editor/_ source, _ testcases (basically, all folders or files starting with _ are optional ),
Delete all directories except the PHP directory in/editor/filemanager/browser/default/connectors/
Delete all directories except the PHP directory under/editor/filemanager/upload/
Delete all files except en. js, zh. js and zh-cn.js under/editor/lang/
I. modify the file upload language to PHP.
Open fckconfig. js
Find:
Var _ FileBrowserLanguage = 'asp'
Var _ QuickUploadLanguage = 'asp'
Changed:
Var FCKConfig. DefaultLanguage = 'zh-cn ';
Var _ FileBrowserLanguage = 'php'
Var _ QuickUploadLanguage = 'php'
II. enable PHP file Upload
1: enable FileBrowser:
Open fckeditor/editor/filemanager/connectors/php/config. php (the Chinese language is not supported here. you can process the Chinese name on your own)
Enable file upload:
Find:
$ Config ['enabled'] = false
Changed:
$ Config ['enabled'] = true
Set the upload Directory:
Find:
$ Config ['userfilespath'] = '/userfiles /'
Changed:
$ Config ['userfilespath'] = 'your project path'
2: enable QuickUpload
Open fckeditor/editor/filemanager/upload/php/config. php
Enable file upload:
Find:
$ Config ['enabled'] = false
Changed:
$ Config ['enabled'] = true
Set the upload Directory:
Find:
$ Config ['userfilespath'] = '/userfiles /'
Changed:
$ Config ['userfilespath'] = 'your project path'
Test
Put FCKeditor in the website root directory
The PHP file contains the/FCKeditor/fckeditor. php file.
The code is as follows: |
|
// Contains the fckeditor class Include ("../FCKeditor/fckeditor. php "); // Set the editor path $ SBasePath = "/FCKeditor /"; // Create a Fckeditor with the form name ipaddr $ OFCKeditor = new FCKeditor ('ipadd '); $ OFCKeditor-> BasePath = $ sBasePath; // Set the initial value of the form. $ OFCKeditor-> Value = 'This is someSample text'; $ OFCKeditor-> Create (); // You can also set $ OFCKeditor-> Width $ OFCKeditor-> Height $ OFCKeditor-> ToolbarSet |
Now, the Fckeditor tutorial for php configuration is here. the above describes the garbled problem of uploading Chinese names. you can search this site for solutions.
...