Enable File Upload on FCKEditor (PHP)


  • Edit
    fckeditor/editor/filemanager/connectors/php/config.php
  • Modify $Config[‘UserFilesPath’]
    Put your application folder here
    Eg:
    $Config[‘UserFilesPath’] = ‘/myapp/’ ;
  • Modify $Config[‘UserFilesAbsolutePath’]
    Put your application full path here. Windows users should use double backslash here
    Eg:
    $Config[‘UserFilesAbsolutePath’] = ‘/var/www/myapp/’ ;

    or

    $Config[‘UserFilesAbsolutePath’] = ‘C:\xampp\htdocs\myapp\’ ;

  • After that, you can customize other variable, like these

$Config[‘FileTypesPath’][‘File’]        = $Config[‘UserFilesPath’] . ‘images/’ ;

$Config[‘FileTypesAbsolutePath’][‘File’]= ($Config[‘UserFilesAbsolutePath’] == ”) ? ” : $Config[‘UserFilesAbsolutePath’].’images/’ ;

$Config[‘FileTypesPath’][‘Image’]        = $Config[‘UserFilesPath’] . ‘images/’ ;

$Config[‘FileTypesAbsolutePath’][‘Image’]= ($Config[‘UserFilesAbsolutePath’] == ”) ? ” : $Config[‘UserFilesAbsolutePath’].’images/’ ;

$Config[‘FileTypesPath’][‘Flash’]        = $Config[‘UserFilesPath’] . ‘images/’ ;

$Config[‘FileTypesAbsolutePath’][‘Flash’]= ($Config[‘UserFilesAbsolutePath’] == ”) ? ” : $Config[‘UserFilesAbsolutePath’].’images/’ ;

$Config[‘FileTypesPath’][‘Media’]        = $Config[‘UserFilesPath’] . ‘images/’;

$Config[‘FileTypesAbsolutePath’][‘Media’]= ($Config[‘UserFilesAbsolutePath’] == ”) ? ” : $Config[‘UserFilesAbsolutePath’].’images/’ ;

You can put different filetype on different upload location. In this example I put all filetype on images folder

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s