加载不是来自“xampp的htdocs”或“root”文件夹的图像

Loading images not from "xampp's htdocs" or "root" folder

本文关键字:root 图像 文件夹 htdocs xampp 加载      更新时间:2023-09-26

这就是链接的样子

<img src="http://127.0.0.1C:/Obrazy/Nowy%20obraz%20mapy%20bitowej.bmp" class="image-preview" style="width: 120px;">

这是绘制链接的代码

 // images preview button
        if ($('table.file-list a[rel="lightbox[images]"]').length > 0) {
            $('a.view-style').show();
        } 
        $('a.view-style').click(function(){
            $('a.image-size').show('');
            $('a.view-style').remove();
            $('table.file-list a[rel="lightbox[images]"]').each(function(index) {
                var img_src = $(this).attr('href');
                $(this).prepend('<img src="'+img_src+'" class="image-preview">');
            });
        });

是否可以从 C:/目录获取图像?它在Windows 7上使用。需要一个快速的解决方案/答案。

图像网址路径之前使用 file:///

file:///C:/Obrazy/Nowy%20obraz%20mapy%20bitowej.bmp