HTML 图像标签
我被要求解决 shtml 文件的问题,问题是这样的:
有人被要求编辑 shtml 文件以添加新的单选按钮。她下载了该文件,添加了一些内容并将其上传到网络服务器。令我震惊的是,img src="images/Front_Page_22.jpg
现在指向 file:///C|\path1\path2\images\Front_Page_22.jpg
(请注意 C- 后面的管道)
附加信息: 下载的页面包含相对路径,一切都是 img src="images/Front_Page_22.jpg
img src=../xyz/images/SomeFile.jpg
或者
我的理解是她没有触摸图像,做了正确的事情标签,因为它们将在服务器上解析并指向服务器上的目录。
我不知道这些相对路径是如何转换为本地路径的
! Person1 在她的本地系统上进行了更改,更改完成后,告诉网站管理员上传文件
网站管理员将文件上传到 Unix 服务器(大学的 Web 服务器位于 unix 机器上) - 我不知道不知道她是使用 Dreamweaver 还是 sftp 上传文件 - 我认为这不是问题,
谢谢
I was asked to resolve an issue with shtml file and the problem is like this:
A person was asked to edit an shtml file to add a new radio button. She downloaded the file, added some content and uploaded it to the web server. To my utter shock, the img src="images/Front_Page_22.jpg
is now pointing to file:///C|\path1\path2\images\Front_Page_22.jpg
(please note the Pipe after C- )
Additional Info:
The page that was downloaded contained relative paths., everything wasimg src="images/Front_Page_22.jpg
img src=../xyz/images/SomeFile.jpg
or
My Understanding was she did the right thing by not touching the image tags, as they would be resolved at the server and will point to the directories on the server..
I am at loss to understand how those relative paths got converted to local paths!
Additional Info available to me:
Person1 Made the changes on her local system, and after the changes are made, tells the web-master to upload the file
The web-master uploads the file to a Unix server ( the university's web server is on a unix box ) - I don't know whether she uses dreamweaver or sftp to upload the files - I don't think that should be a problem
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
很可能是您的 HTML 编辑器更改了
src
属性。检查您的首选项,应该有一个选项可以禁用它。快速修复 --
查找:
file:///C|\path1\path2\images\
替换为:
images/
It was most likely your HTML editor that changed the
src
attribute.. Check your preferences, there should be an option to disable it.Quick fix --
Find:
file:///C|\path1\path2\images\
Replace with:
images/
您使用“另存为”下载了该文件...不要!右键单击>查看源码> Ctrl + A >在选择的编辑器中按 Ctrl + C 和 Ctrl + V。或者以正常方式进行,FTP。
You downloaded the file using save as... Don't! Right click > View Source > Ctrl + A > Ctrl + C and Ctrl + V in the editor of choice. Or do it the normal way, FTP.
由于您无权访问服务器,因此最好的选择是使用 wget< /a>.它将下载页面及其依赖的所有其他图像/css/js 文件。 这里是解释如何使用的基本教程它。
Since you do not have access to the server, your best bet would be to use wget. It will download the page and all the other images/css/js files it depends on. Here is a basic tutorial explaining how to use it.