実現したいこと
CKEditor+KCFinder 画像のアップロード先を変更し、画像の保存については成功しています。ただし、このeditorでアップロードしたファイルがブラウズできません。
直接の原因は、アップロードした時に作成される
HTML
1<img src="/project/image/**.jpg">
というタグですが、本来は上記のように作成されればブラウズできます。
が、実際は、
HTML
1<img src="project/image/**.jpg">
となってしまい、画像が正常にロードされません。
imgタグのsrc属性を正しく
/project/image/**.jpg
としたい場合は、どこを見たらいいでしょうか?
##kcfinder config.php
php
1<?php 2 3/** This file is part of KCFinder project 4 * 5 * @desc Base configuration file 6 * @package KCFinder 7 * @version 2.51 8 * @author Pavel Tzonkov <pavelc@users.sourceforge.net> 9 * @copyright 2010, 2011 KCFinder Project 10 * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 11 * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 12 * @link http://kcfinder.sunhater.com 13 */ 14 15// IMPORTANT!!! Do not remove uncommented settings in this file even if 16// you are using session configuration. 17// See http://kcfinder.sunhater.com/install for setting descriptions 18 19$_CONFIG = array( 20 21 'disabled' => false, 22 'denyZipDownload' => false, 23 'denyUpdateCheck' => false, 24 'denyExtensionRename' => false, 25 'theme' => "oxygen", 26 'uploadURL' => "upload", 27 'uploadDir' => "", 28 'dirPerms' => 0755, 29 'filePerms' => 0644, 30 'access' => array( 31 'files' => array( 32 'upload' => true, 33 'delete' => true, 34 'copy' => true, 35 'move' => true, 36 'rename' => true 37 ), 38 'dirs' => array( 39 'create' => true, 40 'delete' => true, 41 'rename' => true 42 ) 43 ), 44 45 'deniedExts' => "exe com msi bat php phps phtml php3 php4 cgi pl", 46 47 'types' => array( 48 49 // CKEditor & FCKEditor types 50 'files' => "", 51 'flash' => "swf", 52 'images' => "*img", 53 54 // TinyMCE types 55 'file' => "", 56 'media' => "swf flv avi mpg mpeg qt mov wmv asf rm", 57 'image' => "*img", 58 ), 59 60 'filenameChangeChars' => array(/* 61 ' ' => "_", 62 ':' => "." 63 */), 64 65 'dirnameChangeChars' => array(/* 66 ' ' => "_", 67 ':' => "." 68 */), 69 70 'mime_magic' => "", 71 'maxImageWidth' => 0, 72 'maxImageHeight' => 0, 73 'thumbWidth' => 100, 74 'thumbHeight' => 100, 75 'thumbsDir' => ".thumbs", 76 'jpegQuality' => 90, 77 'cookieDomain' => "", 78 'cookiePath' => "", 79 'cookiePrefix' => 'KCFINDER_', 80 81 // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION 82 '_check4htaccess' => true, 83 //'_tinyMCEPath' => "/tiny_mce", 84 85 '_sessionVar' => &$_SESSION['KCFINDER'], 86 //'_sessionLifetime' => 30, 87 //'_sessionDir' => "/full/directory/path", 88 //'_sessionDomain' => ".mysite.com", 89 //'_sessionPath' => "/my/path", 90); 91 92 $_CONFIG['uploadURL'] = '/project/images'; 93 94?>
あなたの回答
tips
プレビュー