我正在为tinymce编辑器使用名为justboil.com的图像上传器插件。
它说得很好,并上传图像来显示它们,但我希望它能够将完整的网址添加到图像的路径中,例如:
*http://www.domain.com/upload_img/img1.jpg http://www.domain.com/upload_img/img1.jpg*
而不是
*/upload_img/img1.jpg*
这是插件的配置代码
| -------------------------------------------------------------------
|
| Path to upload target folder, relative to domain name. NO TRAILING SLASH!
| Example: if an image is acessed via http://www.example.com/images/somefolder/image.jpg, you should specify here:
|
| $config['img_path'] = '/images/somefolder';
|
| -------------------------------------------------------------------*/
$config['img_path'] = '/upload_img'; // Relative to domain name
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path']; // Physical path. [Usually works fine like this]
我尝试过改变$_SERVER['DOCUMENT_ROOT']
到完整的域名,但如果我这样做它不会上传图像
有任何想法吗?
在tinymce init中,您可以设置以下标签:
relative_urls: false,
remove_script_host: false
然后,这将为 TinyMCE 编辑器中添加的所有项目启用带有完整地址的绝对 URL。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)