How to configure the fckeditor editor in php _ PHP Tutorial

Source: Internet
Author: User
Tags php file upload
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.

...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.