FCK configuration in php
I. Modify the File Upload language to PHP.
Open fckconfig. js
Find:
Var _ FileBrowserLanguage = 'asp'
Var _ QuickUploadLanguage = 'asp'
Changed:
Var _ FileBrowserLanguage = 'php'
Var _ QuickUploadLanguage = 'php'
Ii. Enable PHP File Upload
1: Enable FileBrowser:
Open fckeditor/editor/filemanager/connectors/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'
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'
Use instance
<? Php
$ Fck = $ _ POST ["FCKeditor1"];
If ($ fck! = "")
{
Echo htmlspecialchars ($ fck );
}
?>
<Html>
<Head>
<Title> fck test </title>
</Head>
<Body>
<Form action = "index. php" method = "POST">
<? Php
Include ("fckeditor/fckeditor. php"); // load the file
$ OFCKeditor = new FCKeditor ('fckeditor1'); // create a FCKeditor object whose ID is FCKeditor1
$ OFCKeditor-> BasePath = "/fck/fckeditor/"; // set the FCKeditor path
$ OFCKeditor-> Value = ''; // you can specify the default Value.
$ OFCKeditor-> Create (); // Create. Note: If a template (such as smarty) is used, $ fck = $ oFCKeditor-> CreateHtml (); then $ fck is thrown to the template.
?>
<Input type = "submit" value = "submit">
</Form>
</Body>
</Html>
JS uses alert (FCKeditorAPI. GetInstance ('fckeditor1'). GetXHTML (true) to get the value of FCKeditor1;
PHP uses $ _ POST ['fckeditor1'] To get the value of fckeditor1.
From Web0730