我在使用插件jbimages配置tinymce 4.0中上传图像的路径时遇到了一个问题。
进入config.php文件的插件,我有
$config['img_path'] = 'test/admin/uploads'; // Relative to domain name
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path']; // Physical path. [Usually works fine like this]
是行不通的。检查路径$_SERVER['DOCUMENT_ROOT'] i have
/web/htdocs/www.example.com/home/
完整路径是:
/web/htdocs/www.example.com/home/test/admin/uploads
我想要的是
http://www.example.com/test/admin/uploads
,如果我尝试将其设置为$config['img_path']作为绝对路径,则不起作用
$config['img_path'] = 'http://www.example.com/test/admin/uploads'; // Relative to domain name
$config['upload_path'] = $config['img_path'];
我能做什么??由于
尝试在图像路径中使用开始斜杠
$config['img_path'] = '/test/admin/uploads'; // Relative to domain name