Home > Backend Development > PHP Tutorial > FCK configuration in php_PHP tutorial

FCK configuration in php_PHP tutorial

WBOY
Release: 2016-07-13 17:51:52
Original
1132 people have browsed it

1: Change the file upload language to PHP

Open fckconfig.js
Found:
var _FileBrowserLanguage = 'asp'
var _QuickUploadLanguage = 'asp'
Change to:
var _FileBrowserLanguage = 'php'
var _QuickUploadLanguage = 'php'


Two: Enable PHP file upload

1: Enable FileBrowser:
Open fckeditor/editor/filemanager/connectors/php/config.php
Enable file upload:

Found:
                                                                                     $Config['Enabled'] = false                                                         


Change to:
                                                                                                                             
Set the upload storage directory:


Found:                                                                           $Config['UserFilesPath'] = '                                                             

Change to:


$Config['UserFilesPath'] = 'Your own project path'

2: Enable QuickUpload Open fckeditor/editor/filemanager/upload/php/config.php Enable file upload:

Found:
          $Config['Enabled'] = false
                                                                Changed to:
          $Config['Enabled'] = true


Set the upload storage directory:

Found:
         $Config['UserFilesPath'] = '/userfiles/'
                                                                Changed to:
          $Config['UserFilesPath'] = 'Your own project path'


Usage examples

$fck = $_POST [ " FCKeditor1 " ] ;
if ( $fck != "" )
{
echo htmlspecialchars ( $fck ) ;
}
?>



fck test




include ( " fckeditor/fckeditor.php " ); //Load file
$oFCKeditor = new FCKeditor ( ' FCKeditor1 ' ); //Create a FCKeditor object with ID FCKeditor1
$oFCKeditor -> BasePath = " /fck/fckeditor/ " ; //Set FCKeditor path
$oFCKeditor -> Value = '' ; //Set the default value
$oFCKeditor -> Create () ; //Create. Note: If a template (such as smarty) is used, $fck = $oFCKeditor->CreateHtml(); and then throw $fck to the template
?>



JS uses alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true )) to get the value of FCKeditor1;
PHP uses $_POST['FCKeditor1'] to get the value of FCKeditor1

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478165.htmlTechArticle1: Change the file upload language to PHP. Open fckconfig.js and find: var _FileBrowserLanguage = asp var _QuickUploadLanguage = asp Change to : var _FileBrowserLanguage = php var _QuickUploadL...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template