Use the FCKeditor Control in PHP

Source: Internet
Author: User

As mentioned in the previous article, we will not explain it again here.

 

1) copy an object

Decompress FCKeditor to your PHP website directory. The storage location is random. Here I am in the root directory by default

 

2) Call the FCKeditor. php class file

<? PHP

Include ("FCKeditor/FCKeditor. php"); // used to load FCKeditor files

?>

 

 

 

3) instantiate the control. You can put it in the position you want to display in the form to facilitate the value.

<? Php <br/> $ ofckeditor = new FCKeditor ('fckeditor1'); // create a FCKeditor instance <br/> $ ofckeditor-> basepath = '. /FCKeditor/'; // set the FCKeditor directory address <br/> $ FCKeditor-> width = '20140901 '; // set the display width <br/> $ FCKeditor-> Height = '300px '; // set the height of the display height <br/> $ ofckeditor-> Create (); // create an Editor <br/>?> <Br/>

4) value: directly obtain the value of the control through $ _ request [].

5) at this time, you may find that the upload and browsing functions of files and Images cannot be implemented. You need to configure

1. Open FCKeditor/Editor/filemanager/upload/PHP/config. php, find the code $ config ['enabled'], and set the value to true.
2. Set $ config ['userfilespath'] in the following lines and set the upload path.
3. Open the FCKeditor/fckconfig. js file, find code _ filebrowserlanguage, and set the value to PhP. In the next line, set the _ quickuploadlanguage value to PhP.
 

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.