I'm trying to integrate an uploader to Ckeditor and I chose Ckfinder as it seemed to be the most documented. Not enough in my opinion as I've been struggling the whole day without being able to upload a single file. I also checked Stackoverflow and couldn't find recent and accurate answer to my problem.
So I installed it in my /js folder. The structure is as below :
root
|__/js__
|_/ckeditor
|_config.js
|_...
|_/ckfinder
|_config.php
|_...
|_/images__
|/upload
|_form.php
I integrated it that way based on the documentation and various tutorials.
<textarea id="ckeditor1"></textarea>
<script>
var editor = CKEDITOR.replace( 'ckeditor1', {
filebrowserBrowseUrl : 'js/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : 'js/ckfinder/ckfinder.html?type=Images',
filebrowserImageUploadUrl : 'js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'
});
CKFinder.setupCKEditor( editor, '../' );
</script>
Ckeditor and Ckfinder tools appear correctly but when I try to upload a file I receive an error "Server response is incorrect". Opening the server browser returns this :
Parse error: syntax error, unexpected '$value' (T_VARIABLE) in /home/yatacrea/yelofox-test/js/ckfinder/core/connector/php/vendor/aws/aws-sdk-php/src/functions.php on line 36
I didn't alter the original code except for the 'baseUrl' from config.php that I set to my needs.
'baseUrl' => '/images/upload/',
I'm pretty sure it's only a problem of path but couldn't figure out where was my mistake. Can you try and help me with this, please ?
I figured it out. As I was think it was a mistake in the paths. I made a confusion between relative and absolute paths in config.php. It's ok now :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.