具有特殊字符的图像名称未显示在服务器上 [英] Image Names having special characters not displayed on server

查看:138
本文介绍了具有特殊字符的图像名称未显示在服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的问题是,服务器上未显示所有名称中包含特殊字符或空格的图像名称.除了编写代码以除去图像名称中的特殊字符外,我们还有什么方法可以显示这些图像



谢谢

Hi guys,

All Image Names which are having special characters or space in their Name are not displayed on the server my question is. Is there any way through which we can display those images other than writing code from removing special character from Image Name



Thanks

推荐答案

否.问题是空格以HTML img命令的src标记结尾.我会尝试在将文件添加到服务器时而不是在检索文件时将其删除.
No. The problem is that the space ends the src tag of the HTML img command. I would try to remove them when the file is added to the server, rather than when it is retrieved.


您只能在尝试上载时从文件名中删除特殊符号.文件.使用正则表达式或JQuery进行相同操作

请参阅此线程
http://www.dreamincode.net/forums/topic /51561-help-removing-special-characters-from-uploaded-files/ [
You can only remove the special symbols from the file name when you are trying to upload the file. Use regular expression or JQuery to do the same

refer this thread
http://www.dreamincode.net/forums/topic/51561-help-removing-special-characters-from-uploaded-files/[^]


这篇关于具有特殊字符的图像名称未显示在服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆