Integrate the ckeditor and ckfinder final version in php

Source: Internet
Author: User
I wrote an article about ckeditor configuration in front of my blog, but it was urgently copied from the Internet. Because I have written a php program, I want to use the html editor in the old version of fkeditor. Therefore, ckeditor is ready to be used. ckeditor (Changsha seo) has the disadvantage that it cannot upload local images and flash, so it has to put ckeditor and ck

I wrote an article about ckeditor configuration in front of my blog, but it was urgently copied from the Internet. Because I have written a php program, I want to use the html editor in the old version of fkeditor. Therefore, ckeditor is ready to be used. ckeditor (Changsha seo) has the disadvantage that it cannot upload local images and flash, so it has to put ckeditor and ck

I wrote an article about ckeditor configuration in front of my blog, but it was urgently copied from the Internet. Because I have written a php program, I want to use the html editor in the old version of fkeditor. Therefore, ckeditor is ready to be used. The disadvantage of ckeditor (Changsha seo) is that it cannot upload local images and flash, so it has to integrate ckeditor and ckfinder. Next we will start.

1. Configure ckfinder

1. First, extract ckeditor and ckfinder from the official website and put them (Changsha seo) under the website's directory, and then put the ckfinder file under the ckeditor file.

2. Before ckfinder does not modify the configuration, it is not allowed to upload files to the server. Therefore, we need to change "return false" in the config. php file under the ckfinder file to "return true. In order for everyone to find it, the detailed code =

Function CheckAuthentication ()
{
// WARNING: do not simply return "true". By doing so, you are allowing
// "Anyone" to upload and list the files in your server. You must implement
// Some kind of session validation here. Even something very simple...

// Return isset ($ _ SESSION ['isauthorized']) & $ _ SESSION ['isauthorized'];

//... Where $ _ SESSION ['isauthorized'] is set to "true" as soon as
// User logs in your system. To be able to use session variables don't
// Forget to add session_start () at the top of this file.

Return flase; // change to person return false
}
3. After the upload function is enabled, we do not need to set the path for storing the uploaded files. Find config. php In the ckfinder file, open config. php, find "$ baseUrl", and assign the PATH value of the file to be stored to this variable. That is, if you want to store the file in the "sp" file home under the root directory, assign the value "$ baseurl = '.. /sp/'; ", as long as the file is mounted, it will automatically create the corresponding folder.

2. Integrate ckeditor and ckfinder

1. Create a New php webpage file and load ckeditor and ckfinder in the header, for example:

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.