나는 CKfinder와 CKeditor를 통합하기 위해 http://dwij.co.in/ckeditor-ckfinder-integration-using-php/ 를 사용해 보았지만 작동하지 않았습니다.
나에게 오류를 보여줍니다. "보안상의 이유로 파일 브라우저를 사용할 수 없습니다. 시스템 관리자에게 문의하여 CKFinder 구성 파일을 확인하십시오". (이 경고는 평가판을 다운로드하기 때문입니까?)
다음은 내 구성 파일입니다.
<?php
function CheckAuthentication()
{
return false;
}
$config['LicenseName'] = '';
$config['LicenseKey'] = '';
$baseUrl = 'http://localhost/test/uploads';
$baseDir = resolveUrl($baseUrl);
$config['Thumbnails'] = Array(
'url' => $baseUrl . '_thumbs',
'directory' => $baseDir . '_thumbs',
'enabled' => true,
'directAccess' => false,
'maxWidth' => 100,
'maxHeight' => 100,
'bmpSupported' => false,
'quality' => 80);
$config['Images'] = Array(
'maxWidth' => 1600,
'maxHeight' => 1200,
'quality' => 80);
$config['RoleSessionVar'] = 'CKFinder_UserRole';
$config['AccessControl'][] = Array(
'role' => '*',
'resourceType' => '*',
'folder' => '/',
'folderView' => true,
'folderCreate' => true,
'folderRename' => true,
'folderDelete' => true,
'fileView' => true,
'fileUpload' => true,
'fileRename' => true,
'fileDelete' => true);
$config['DefaultResourceTypes'] = '';
$config['ResourceType'][] = Array(
'name' => 'Files', // Single quotes not allowed
'url' => $baseUrl . 'files',
'directory' => $baseDir . 'files',
'maxSize' => 0,
'allowedExtensions' => '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip',
'deniedExtensions' => '');
$config['ResourceType'][] = Array(
'name' => 'Images',
'url' => $baseUrl . 'images',
'directory' => $baseDir . 'images',
'maxSize' => 0,
'allowedExtensions' => 'bmp,gif,jpeg,jpg,png',
'deniedExtensions' => '');
$config['ResourceType'][] = Array(
'name' => 'Flash',
'url' => $baseUrl . 'flash',
'directory' => $baseDir . 'flash',
'maxSize' => 0,
'allowedExtensions' => 'swf,flv',
'deniedExtensions' => '');
$config['CheckDoubleExtension'] = true;
$config['DisallowUnsafeCharacters'] = false;
$config['FilesystemEncoding'] = 'UTF-8';
$config['SecureImageUploads'] = false;
$config['CheckSizeAfterScaling'] = true;
$config['HtmlExtensions'] = array('html', 'htm', 'xml', 'js');
$config['HideFolders'] = Array(".*", "CVS");
$config['HideFiles'] = Array(".*");
$config['ChmodFiles'] = 0777 ;
$config['ChmodFolders'] = 0777 ;
$config['ForceAscii'] = false;
$config['XSendfile'] = false;
include_once "plugins/imageresize/plugin.php";
include_once "plugins/fileeditor/plugin.php";
include_once "plugins/zip/plugin.php";
$config['plugin_imageresize']['smallThumb'] = '90x90';
$config['plugin_imageresize']['mediumThumb'] = '120x120';
$config['plugin_imageresize']['largeThumb'] = '180x180';
여기:
function CheckAuthentication()
{
return false;
}
기본적으로 CheckAuthentication()
보안상의 이유로 비활성화되어 있습니다. 누구나 서버에 파일을 업로드 할 수 있기 때문입니다.
테스트 목적으로 돌아올 수 true
있지만 요점은 자폐 된 사용자에게만 권한을 부여하는 일부 논리를 구현한다는 것입니다.
function CheckAuthentication()
{
//put some logic here
return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다