SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    displaying a image with special characters on the name "1.img_(new)_thumb.jpg"

    I found that some server can display image which contains symbol like dot , bracket in its name.

    http://mysite.com/1.img_(new)_thumb.jpg

    However, some server will not allow it.

    May I know can i control it through php.ini etc??? (besides using urlencode at the image)

    Thank you!

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,604
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Many of those characters are invalid in file names to start with and so shouldn't ever be there. For those that are legal but can be confused with other meanings you should escape them using urlencode as that is what encoding is for.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Many of those characters are invalid in file names to start with and so shouldn't ever be there. For those that are legal but can be confused with other meanings you should escape them using urlencode as that is what encoding is for.
    thank you for sharing...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •