由Tinymce在cakephp上传的图片

时间:2014-06-30 05:58:06

标签: cakephp

我正在尝试应用此插件http://justboil.me/在tinymce中添加上传选项。它在原始php中工作正常。但是cakephp中的问题。在cakephp中我保留了cakephp js中的tinymce文件夹文件夹和tinymce所有选项工作正常。添加justboil插件后我得到图像上传选项但问题是图像选择图像没有上传到我的上传文件夹。我想这里分配路径的问题。这里我打开上传webroot中的文件夹,比我在配置文件中通过下面的代码

分配了这个路径
$config['img_path'] = '/app/webroot/uploads'; // Relative to domain name
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path']; // Physical path. [Usually works fine like this] 

这里屏幕短缺

enter image description here

尝试上传图片后

enter image description here

添加图片后,这只是在加载一段时间后加载给我一个未找到的按摩页面。

enter image description here

有任何解决方案吗?或者在cakephp的文本编辑器中有上传图像的简单解决方案吗?

1 个答案:

答案 0 :(得分:0)

编辑你的配置就像你在js / tinymce中的tinymce代码一样:

$config['img_path'] = '../../uploads';

如果您的tinymce代码直接在js中而不是编辑为:

 $config['img_path'] = '../uploads';
相关问题