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: