我正在使用一个名为justboil.com的图像上传器插件用于tinymce编辑器.
它很棒,并上传图像以显示它们,但我希望它能够将完整的网址添加到图像的路径,如:
*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]
Run Code Online (Sandbox Code Playgroud)
我已经尝试更改$_SERVER['DOCUMENT_ROOT']
为完整的域名,但如果我这样做,它不会上传图像
有任何想法吗?