0
下面的源字段中出現了什麼問題?我只是試圖從我的本地系統顯示圖像。無法從窗口上的本地文件夾訪問HTML
<img id="image1" src="file:///C:/cf-logo.jpg" class="img-polaroid"><br>
下面的源字段中出現了什麼問題?我只是試圖從我的本地系統顯示圖像。無法從窗口上的本地文件夾訪問HTML
<img id="image1" src="file:///C:/cf-logo.jpg" class="img-polaroid"><br>
資產(圖像,CSS文件,JavaScript文件等),必須在Web根(或以下),以可以觀看在瀏覽器中。
<!-- image is in the root web directory -->
<img id="image1" src="/cf-logo.jpg" class="img-polaroid"><br>
解決此問題的唯一方法是調用服務器端腳本來獲取文件並將其返回給您。
<!-- image served by a script that can access the file directory -->
<img id="image1" src="/image.php?i=cf-logo.jpg" class="img-polaroid"><br>