Home >Backend Development >PHP Tutorial >FCK configuration in php_PHP tutorial
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:
Found: Found:
$fck = $_POST [ " FCKeditor1 " ] ;
$Config['Enabled'] = false
Change to:
Set the upload storage directory:
Found:
$Config['UserFilesPath'] = '
$Config['UserFilesPath'] = 'Your own project path'
2: Enable QuickUpload
Open fckeditor/editor/filemanager/upload/php/config.php
Enable file upload:
$Config['Enabled'] = false
Changed to:
$Config['Enabled'] = true
Set the upload storage directory:
$Config['UserFilesPath'] = '/userfiles/'
Changed to:
$Config['UserFilesPath'] = 'Your own project path'
Usage examples
if ( $fck != "" )
{
echo htmlspecialchars ( $fck ) ;
}
?>
JS uses alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true )) to get the value of FCKeditor1;
PHP uses $_POST['FCKeditor1'] to get the value of FCKeditor1