FCKeditor Editor in PHP Configuration Method _ Web page Editor

Source: Internet
Author: User
Tags file upload php file upload
One: Modify file upload language for PHP
Open Fckconfig.js
Found it:
var _filebrowserlanguage = ' asp '
var _quickuploadlanguage = ' asp '
Change into:
var _filebrowserlanguage = ' php '
var _quickuploadlanguage = ' php '


Second: Enable PHP file Upload

1: Enable Filebrowser:
Open fckeditor/editor/filemanager/connectors/php/config.php
Enable File Upload:

Found it:
$Config [' Enabled '] = False

Change into:
$Config [' Enabled '] = True

Set up upload directory:

Found it:
$Config [' userfilespath '] = '/userfiles/'
Change into:
$Config [' userfilespath '] = ' your own project path '


2: Enable Quickupload
Open fckeditor/editor/filemanager/upload/php/config.php
Enable File Upload:

Found it:
$Config [' Enabled '] = False
Change into:
$Config [' Enabled '] = True


Set up upload directory:

Found it:
$Config [' userfilespath '] = '/userfiles/'
Change into:
$Config [' userfilespath '] = ' your own project path '

Working with instances
Copy Code code as follows:

<?php
$FCK = $_post ["FCKeditor1"];
if ($fck!= "")
{
echo Htmlspecialchars ($FCK);
}
?>
<TITLE>FCK Test </title>
<body>
<form action= "index.php" method= "POST" >
<?php
Include ("fckeditor/fckeditor.php"); Loading files
$oFCKeditor = new FCKeditor (' FCKeditor1 '); Create a FCKeditor object ID of FCKeditor1
$oFCKeditor-> basepath = "/fck/fckeditor/"; Set FCKeditor path
$oFCKeditor-> Value = '; Set default values
$oFCKeditor-> Create (); Create. Note: If you use a template (such as smarty) then $fck = $oFCKeditor->createhtml (); then throw $fck to the template
?>
<input type= "Submit" value= "submitted" >
</form>
</body>

JS with alert (fckeditorapi.getinstance (' FCKeditor1 '). Getxhtml (true) to get the value of the FCKeditor1;
PHP uses $_post[' FCKeditor1 ' to get the FCKeditor1 value.

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.